mirror of
https://github.com/python/cpython.git
synced 2025-08-12 21:11:35 +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
8fffbb0982
commit
af2d24b5ad
3 changed files with 35 additions and 18 deletions
|
@ -743,6 +743,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