mkhomedir golden
mkhomedir
mksourcedir

# test replace directory with file
rm $HOME/.file
mkdir $HOME/.file
chezmoi apply --force
cmp $HOME/.file golden/.file

# test replace file with directory
rm $HOME/.dir
mkfile $HOME/.dir
chezmoi apply --force
cmp $HOME/.dir/file golden/.dir/file
cmp $HOME/.dir/subdir/file golden/.dir/subdir/file

# test replace file with symlink
rm $HOME/.symlink
mkfile $HOME/.symlink
chezmoi apply --force
cmp $HOME/.symlink golden/.symlink
