test(sync): make the tests pass on Windows and run them in CI

Ten tests assumed POSIX behaviour:

- Five asserted os.ModeSymlink, but Windows links with a junction;
  check utils.IsLinkMode instead.
- Two used `/abs/...` as an absolute path, which has no volume on
  Windows; give the fixtures one.
- Windows has no permission bits to preserve, so the 0600 check is
  skipped there.
- Reading a file as a directory reports not-exist on Windows, which
  prune ignores, so that prune-error test is skipped there.
- A single-file extension relies on the shebang and the executable bit,
  so ListExtensions finds only directory extensions on Windows, as the
  extras docs describe.

Add ./internal/sync and ./internal/trash to the windows-test package
list so they stay green.

Refs #344
This commit is contained in:
Willie
2026-10-06 09:40:50 +08:00
parent 8f47b5962a
commit 8e9ef1c806
9 changed files with 41 additions and 16 deletions
+2
View File
@@ -121,6 +121,8 @@ jobs:
./internal/search \
./internal/skill \
./internal/skillignore \
./internal/sync \
./internal/trash \
./internal/ui \
./internal/uidist \
./internal/utils \