[windows] skip 'UNIX only'
[!umask:022] skip

exec chezmoi apply
cmpenv stdout golden/apply

env $=$
exec chezmoi dump
cmp stdout golden/dump.json

exec chezmoi archive --output=archive.tar
exec tar -tf archive.tar
[openbsd] cmp stdout golden/archive-openbsd
[!openbsd] cmp stdout golden/archive

-- golden/apply --
$HOME${/}dir
-- golden/archive --
dir/
dir/script.sh
-- golden/archive-openbsd --
dir
dir/script.sh
-- golden/dump.json --
{
  "dir": {
    "type": "dir",
    "name": "dir",
    "perm": 493
  },
  "dir/script.sh": {
    "type": "script",
    "name": "dir/script.sh",
    "contents": "#!/bin/sh\n\npwd\n"
  }
}
-- home/user/.local/share/chezmoi/dir/run_script.sh --
#!/bin/sh

pwd
