# test that chezmoi add can add files that look like files in the source state
chezmoi add $HOME${/}dot_file $HOME${/}run_script $HOME${/}symlink_symlink $HOME${/}template.tmpl
rm $HOME/dot_file $HOME/run_script $HOME/symlink_symlink $HOME/template.tmpl
chezmoi apply --force
! exists $HOME/.file
! stdout .
! exists $HOME/symlink
! exists $HOME/template
cmp $HOME/dot_file golden/dot_file
cmp $HOME/run_script golden/run_script
cmp $HOME/symlink_symlink golden/symlink_symlink
cmp $HOME/template.tmpl golden/template.tmpl

-- home/user/dot_file --
# contents of dot_file
-- home/user/run_script --
#!/bin/sh

echo contents of run_script
-- home/user/symlink_symlink --
# contents of symlink_symlink
-- home/user/template.tmpl --
# contents of template.tmpl
-- golden/dot_file --
# contents of dot_file
-- golden/run_script --
#!/bin/sh

echo contents of run_script
-- golden/symlink_symlink --
# contents of symlink_symlink
-- golden/template.tmpl --
# contents of template.tmpl
