test(symlinkguard): an unremovable special file must not be reported as removed (#179)
CI / Lint / Test / Vet (pull_request) Successful in 1m15s
CI / Mirror to GitHub (pull_request) Skipped

Review round 2 on PR #190: swallowing root.Remove's error in
removeSpecial left every test green (the false 'removed' alert also named
the file). The test now asserts no message says 'removed'; red under that
flip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 22:55:36 +02:00
co-authored by Claude Opus 5.5
parent edcfe9e9bc
commit e614d39e06
@@ -98,4 +98,7 @@ func TestWatchReportsASpecialFileItCannotRemove(t *testing.T) {
defer n.mu.Unlock() defer n.mu.Unlock()
assert.Contains(t, n.msgs[0], "ro/f.md") assert.Contains(t, n.msgs[0], "ro/f.md")
assert.Contains(t, n.msgs[0], "special file") assert.Contains(t, n.msgs[0], "special file")
for _, m := range n.msgs {
assert.NotContains(t, m, "removed", "a file it could not remove was reported as removed")
}
} }