[!windows] skip 'Windows only'

# test that chezmoi apply normalizes symlinks
chezmoi apply $HOME${/}.symlink_backward_slash $HOME${/}.symlink_forward_slash
readlink $HOME/.symlink_backward_slash $HOME\.dir\file
readlink $HOME/.symlink_forward_slash $HOME\.dir\file

# test that the persistent state matches the actual state
chezmoi verify

-- home/user/.dir/file --
# contents of .dir/file
-- home/user/.local/share/chezmoi/symlink_dot_symlink_backward_slash.tmpl --
{{ env "HOME" }}\.dir\file
-- home/user/.local/share/chezmoi/symlink_dot_symlink_forward_slash.tmpl --
{{ env "HOME" }}/.dir/file
