summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posixpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_posixpath.py')
-rw-r--r--Lib/test/test_posixpath.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index e4d8384..5fc4205 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -329,13 +329,30 @@ class PosixPathTest(unittest.TestCase):
("/..", "/"),
("/../", "/"),
("/..//", "/"),
+ ("//.", "//"),
("//..", "//"),
+ ("//...", "//..."),
+ ("//../foo", "//foo"),
+ ("//../../foo", "//foo"),
("/../foo", "/foo"),
("/../../foo", "/foo"),
("/../foo/../", "/"),
("/../foo/../bar", "/bar"),
("/../../foo/../bar/./baz/boom/..", "/bar/baz"),
("/../../foo/../bar/./baz/boom/.", "/bar/baz/boom"),
+ ("foo/../bar/baz", "bar/baz"),
+ ("foo/../../bar/baz", "../bar/baz"),
+ ("foo/../../../bar/baz", "../../bar/baz"),
+ ("foo///../bar/.././../baz/boom", "../baz/boom"),
+ ("foo/bar/../..///../../baz/boom", "../../baz/boom"),
+ ("/foo/..", "/"),
+ ("/foo/../..", "/"),
+ ("//foo/..", "//"),
+ ("//foo/../..", "//"),
+ ("///foo/..", "/"),
+ ("///foo/../..", "/"),
+ ("////foo/..", "/"),
+ ("/////foo/..", "/"),
]
def test_normpath(self):