mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
This commit is contained in:
parent
f08c073ded
commit
05c075d629
9 changed files with 69 additions and 40 deletions
|
@ -18,13 +18,14 @@ def tester(fn, wantResult):
|
|||
|
||||
tester('ntpath.splitext("foo.ext")', ('foo', '.ext'))
|
||||
tester('ntpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext'))
|
||||
tester('ntpath.splitext(".ext")', ('', '.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.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d'))
|
||||
|
||||
tester('ntpath.splitdrive("c:\\foo\\bar")',
|
||||
('c:', '\\foo\\bar'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue