test(trash): a trailing-space folder is hidden by name, not a real spelling (#543)
The Windows job showed that this spelling does not reach the file, unlike a trailing dot, so the test's assumption was wrong. The gate already answered.
This commit is contained in:
@@ -313,7 +313,6 @@ class TestWindowsSpellings(_GateCase):
|
||||
def spellings(self):
|
||||
spelled = [
|
||||
"$RECYCLE.BIN./x.png",
|
||||
"$RECYCLE.BIN /x.png",
|
||||
"$recycle.bin/x.png",
|
||||
".TRASH-1000/files/x.png",
|
||||
".Trash-1000./files/x.png",
|
||||
@@ -332,6 +331,12 @@ class TestWindowsSpellings(_GateCase):
|
||||
self.assertTrue((self.root / relative).is_file(), "spelling is real")
|
||||
await self.assert_hidden_everywhere(relative)
|
||||
|
||||
async def test_a_folder_spelled_with_a_trailing_space_is_hidden_by_name(self):
|
||||
# Measured on the Windows job (run 41123443497): unlike a trailing dot,
|
||||
# this spelling does not reach the file through a longer path. The name
|
||||
# check still answers for it, whatever a volume does.
|
||||
await self.assert_hidden_everywhere("$RECYCLE.BIN /x.png")
|
||||
|
||||
async def test_a_root_spelled_in_another_case_does_not_fail_open(self):
|
||||
inside = self.root / ".Trash-1000" / "files" / "x.png"
|
||||
self.assertTrue(in_trash_below_roots(inside, [str(self.root).upper()]))
|
||||
|
||||
Reference in New Issue
Block a user