diff options
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r-- | Lib/test/test_ntpath.py | 10 |
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')) |