# test adding a file with --autotemplate
chezmoi add --autotemplate $HOME${/}.template
cmp $CHEZMOISOURCEDIR/dot_template.tmpl golden/dot_template.tmpl

# test adding a symlink with --autotemplate
symlink $HOME/.symlink -> .target-value
chezmoi add --autotemplate $HOME${/}.symlink
cmp $CHEZMOISOURCEDIR/symlink_dot_symlink.tmpl golden/symlink_dot_symlink.tmpl

-- golden/dot_template.tmpl --
key = {{ .variable }}
-- golden/symlink_dot_symlink.tmpl --
.target-{{ .variable }}
-- home/user/.config/chezmoi/chezmoi.toml --
[data]
  variable = "value"
-- home/user/.template --
key = value
