[windows] skip 'UNIX only'

# test that chezmoi status prints that it will run the script
chezmoi status
cmp stdout golden/status

# test that chezmoi diff includes the script
chezmoi diff
cmp stdout golden/diff.diff

# test that chezmoi apply runs the script
chezmoi apply --force
stdout ${HOME@R}

# test that the script is recorded in the state
chezmoi state dump
stdout bb29fcd5733098d4e391d85d487d84d1d64cf42eae34b53951ae470b98c9ca8d # sha256sum of script contents

# test that chezmoi diff no longer includes the script
chezmoi diff
! stdout .

# test that chezmoi status will not print that it will run the script
chezmoi status
! stdout .

# test that chezmoi apply does not run the script a second time and does not prompt
chezmoi apply
! stdout ${HOME@R}

# test that chezmoi apply after the script is modified runs the script a second time and does not prompt
edit $CHEZMOISOURCEDIR/run_once_script.sh
chezmoi apply
stdout ${HOME@R}

# test that resetting the state causes the next chezmoi apply to run the script
chezmoi state reset --force
chezmoi apply --force
stdout ${HOME@R}

-- golden/diff.diff --
diff --git a/script.sh b/script.sh
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9103e018df1bbc178e66b46d8f133f49c85225d 100755
--- a/script.sh
+++ b/script.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pwd
-- golden/status --
 R script.sh
-- home/user/.local/share/chezmoi/run_once_script.sh --
#!/bin/sh

pwd
