Skip to content

Commit 694f093

Browse files
committed
Add tests for mixed path separators (Windows only)
1 parent 053729d commit 694f093

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_ntpath.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ def test_splitroot(self):
165165
tester("ntpath.splitroot('\\\\a\\b')", ('\\\\a\\b', '', ''))
166166
tester("ntpath.splitroot('\\\\a\\b\\')", ('\\\\a\\b', '\\', ''))
167167
tester("ntpath.splitroot('\\\\a\\b\\c\\d')", ('\\\\a\\b', '\\', 'c\\d'))
168+
# Mixed path separators
169+
tester("ntpath.splitroot('c:/\\')", ('c:', '/', '\\'))
170+
tester("ntpath.splitroot('c:\\/')", ('c:', '\\', '/'))
171+
tester("ntpath.splitroot('/\\a/b\\/\\')", ('/\\a/b', '\\', '/\\'))
172+
tester("ntpath.splitroot('\\/a\\b/\\/')", ('\\/a\\b', '/', '\\/'))
173+
168174

169175
def test_split(self):
170176
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))

0 commit comments

Comments
 (0)