diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-11-21 14:43:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 14:43:36 (GMT) |
commit | 60ec854bc297e04718fe13db3605d0465bf8badb (patch) | |
tree | 98e06da03433b3e10b0ad9ac181bded4cbd6ba48 /Lib/test/test_ntpath.py | |
parent | 0c5556fcb7315f26aa4b192e341cb2a72bb78f41 (diff) | |
download | cpython-60ec854bc297e04718fe13db3605d0465bf8badb.zip cpython-60ec854bc297e04718fe13db3605d0465bf8badb.tar.gz cpython-60ec854bc297e04718fe13db3605d0465bf8badb.tar.bz2 |
gh-126780: Fix `ntpath.normpath()` for drive-relative paths (GH-126801)
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r-- | Lib/test/test_ntpath.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 4f59184..6715071 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -347,13 +347,18 @@ class TestNtpath(NtpathTestCase): tester("ntpath.normpath('..')", r'..') tester("ntpath.normpath('.')", r'.') + tester("ntpath.normpath('c:.')", 'c:') tester("ntpath.normpath('')", r'.') tester("ntpath.normpath('/')", '\\') tester("ntpath.normpath('c:/')", 'c:\\') tester("ntpath.normpath('/../.././..')", '\\') tester("ntpath.normpath('c:/../../..')", 'c:\\') + tester("ntpath.normpath('/./a/b')", r'\a\b') + tester("ntpath.normpath('c:/./a/b')", r'c:\a\b') tester("ntpath.normpath('../.././..')", r'..\..\..') tester("ntpath.normpath('K:../.././..')", r'K:..\..\..') + tester("ntpath.normpath('./a/b')", r'a\b') + tester("ntpath.normpath('c:./a/b')", r'c:a\b') tester("ntpath.normpath('C:////a/b')", r'C:\a\b') tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b') |