summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-12-12 20:30:20 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-12-12 20:30:20 (GMT)
commitde3337913f08266b16842f21a67427d10725ed8f (patch)
treef54488a637762efbde037aac60ebbfb83a217735 /Lib/test/test_ntpath.py
parent427a290c9afca605ab8ed799f0072d890318b837 (diff)
downloadcpython-de3337913f08266b16842f21a67427d10725ed8f.zip
cpython-de3337913f08266b16842f21a67427d10725ed8f.tar.gz
cpython-de3337913f08266b16842f21a67427d10725ed8f.tar.bz2
Patch #536661: Improve performance of splitext. Add test_macpath.
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 40d785f..2419844 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -15,6 +15,16 @@ def tester(fn, wantResult):
print " returned: " + str(gotResult)
print ""
errors = errors + 1
+
+tester('ntpath.splitext("foo.ext")', ('foo', '.ext'))
+tester('ntpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext'))
+tester('ntpath.splitext(".ext")', ('', '.ext'))
+tester('ntpath.splitext("\\foo.ext\\foo")', ('\\foo.ext\\foo', ''))
+tester('ntpath.splitext("foo.ext\\")', ('foo.ext\\', ''))
+tester('ntpath.splitext("")', ('', ''))
+tester('ntpath.splitext("foo.bar.ext")', ('foo.bar', '.ext'))
+tester('ntpath.splitext("xx/foo.bar.ext")', ('xx/foo.bar', '.ext'))
+tester('ntpath.splitext("xx\\foo.bar.ext")', ('xx\\foo.bar', '.ext'))
tester('ntpath.splitdrive("c:\\foo\\bar")',
('c:', '\\foo\\bar'))