test(symlinkguard): an unremovable special file must not be reported as removed (#179)
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:
@@ -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")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user