[windows] skip # FIXME make this test pass on windows

mksourcedir

# test that chezmoi apply sets the state
chezmoi apply --force
exists $CHEZMOISOURCEDIR/dot_file
chezmoi state get --bucket=entryState --key=$WORK/home/user/.dir
cmp stdout golden/state-get-dir.json
chezmoi state get --bucket=entryState --key=$WORK/home/user/.file
cmp stdout golden/state-get-file.json

# test that chezmoi forget forgets a dir
exists $CHEZMOISOURCEDIR/dot_dir
chezmoi forget --force $HOME${/}.dir
! exists $CHEZMOISOURCEDIR/dot_dir
chezmoi state get --bucket=entryState --key=$WORK/home/user/.dir
! stdout .

# test that chezmoi forget forgets a file
chezmoi forget --force $HOME${/}.file
! exists $CHEZMOISOURCEDIR/dot_file
chezmoi state get --bucket=entryState --key=$WORK/home/user/.file
! stdout .

chhome home2/user

# test that chezmoi forget forgets a file when .chezmoiroot is used
chezmoi forget --force $HOME${/}.file
! exists $CHEZMOISOURCEDIR/home/dot_file

-- golden/state-get-dir.json --
{
  "type": "dir",
  "mode": 2147484141
}
-- golden/state-get-file.json --
{
  "type": "file",
  "mode": 420,
  "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663"
}
-- home2/user/.local/share/chezmoi/.chezmoiroot --
home
-- home2/user/.local/share/chezmoi/home/dot_file --
# contents of .file
