[!windows] skip 'Windows only'

# test that the persistent state is only created on demand
chezmoi state dump --format=yaml
cmp stdout golden/dump
! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

# test that chezmoi apply updates the persistent state
chezmoi apply --force
exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

# test that the persistent state records that script was run
chezmoi state dump --format=yaml
stdout c22efac7af1ab6b9b5b74a852250ef7c4f78ebad7d5655bf5db3b5d9d3d2070c:
stdout runAt:

# test that chezmoi state reset removes the persistent state
chezmoi --force state reset
! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

-- golden/dump --
configState: {}
entryState: {}
scriptState: {}
-- home/user/.local/share/chezmoi/run_once_script.cmd --
:: don't need to actually do anything
