[windows] mkdir $CHEZMOICONFIGDIR # FIXME remove this

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

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

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

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