summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-31 21:40:15 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-31 21:40:15 (GMT)
commitcfb68218b701e1bf73bb82e51dfc8446ab65452a (patch)
tree85088cd11d198eef87c824046d8fb41e1e77c588 /Lib/test/test_ntpath.py
parenta8867b4173d03e7c321e9de8be529f3dd7e67abe (diff)
downloadcpython-cfb68218b701e1bf73bb82e51dfc8446ab65452a.zip
cpython-cfb68218b701e1bf73bb82e51dfc8446ab65452a.tar.gz
cpython-cfb68218b701e1bf73bb82e51dfc8446ab65452a.tar.bz2
#7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 0fd81b6..86e3eda 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -174,6 +174,9 @@ class TestNtpath(unittest.TestCase):
tester("ntpath.normpath('C:////a/b')", r'C:\a\b')
tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b')
+ tester("ntpath.normpath('\\\\.\\NUL')", r'\\.\NUL')
+ tester("ntpath.normpath('\\\\?\\D:/XY\\Z')", r'\\?\D:/XY\Z')
+
def test_expandvars(self):
with support.EnvironmentVarGuard() as env:
env.clear()