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

chhome home2/user

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

chhome home3/user

# test that --config flag is respected
exec chezmoi apply --config=$HOME/.chezmoi.toml
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 --
