mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)
(cherry picked from commit 4b00aba42e
)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
This commit is contained in:
parent
219b8266db
commit
a853610282
3 changed files with 35 additions and 18 deletions
|
@ -811,6 +811,9 @@ class TestNtpath(NtpathTestCase):
|
|||
tester('ntpath.abspath("C:\\spam. . .")', "C:\\spam")
|
||||
tester('ntpath.abspath("C:/nul")', "\\\\.\\nul")
|
||||
tester('ntpath.abspath("C:\\nul")', "\\\\.\\nul")
|
||||
self.assertTrue(ntpath.isabs(ntpath.abspath("C:spam")))
|
||||
self.assertEqual(ntpath.abspath("C:\x00"), ntpath.join(ntpath.abspath("C:"), "\x00"))
|
||||
self.assertEqual(ntpath.abspath("\x00:spam"), "\x00:\\spam")
|
||||
tester('ntpath.abspath("//..")', "\\\\")
|
||||
tester('ntpath.abspath("//../")', "\\\\..\\")
|
||||
tester('ntpath.abspath("//../..")', "\\\\..\\")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue