From 3d615b2ed89935655cef60754e08e41342f43787 Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Fri, 30 Oct 2026 13:47:41 -0700 Subject: [PATCH] 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. --- tests/test_trash_gate_routes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_trash_gate_routes.py b/tests/test_trash_gate_routes.py index a7e6a037..91f69a98 100644 --- a/tests/test_trash_gate_routes.py +++ b/tests/test_trash_gate_routes.py @@ -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()]))