# test that --source flag is respected
chezmoi apply --source=~/.dotfiles
cmp $HOME/.file golden/.file

# test that --destination flag is respected
chhome home2/user
mkdir tmp
chezmoi apply --destination=$WORK/tmp
cmp tmp/.file golden/.file

# test that --config flag is respected
chhome home3/user
chezmoi apply --config=$HOME/.chezmoi.toml --debug
cmp $HOME/tmp/.file golden/.file

-- golden/.file --
# contents of .file
-- home/user/.dotfiles/dot_file --
# contents of .file
-- home2/user/.local/share/chezmoi/dot_file --
# contents of .file
-- home3/user/.chezmoi.toml --
sourceDir = "~/.dotfiles"
destDir = "~/tmp"
-- home3/user/.dotfiles/dot_file --
# contents of .file
-- home3/user/tmp/.keep --
