[windows] mkdir $CHEZMOICONFIGDIR # FIXME remove this

# test that chezmoi state get returns nothing for a non-existing bucket/key
exec chezmoi state get --bucket=bucket --key=key
! stdout .

# test that chezmoi state set sets a value that can be retrieved with chezmoi state get
exec chezmoi state set --bucket=bucket --key=key --value=value
exec chezmoi state get --bucket=bucket --key=key
stdout value
exec chezmoi state data --format=yaml
cmp stdout golden/data.yaml

# test that chezmoi state delete deletes a value
exec chezmoi state delete --bucket=bucket --key=key
! stdout .
exec chezmoi state data --format=yaml
cmp stdout golden/data-after-delete.yaml

-- golden/data-after-delete.yaml --
bucket: {}
-- golden/data.yaml --
bucket:
    key: value
