mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix for #8879.
Amaury noticed that this was originally written in a way that would fail on names that can't be encoded with the mbcs codec. Restructured the function to work with wide names first then narrow names second, to fall in line with the way other functions are written in posixmodule.c.
This commit is contained in:
parent
1de911592e
commit
fc889c48ed
2 changed files with 23 additions and 2 deletions
|
@ -887,6 +887,11 @@ class LinkTests(unittest.TestCase):
|
|||
self._test_link(bytes(self.file1, sys.getfilesystemencoding()),
|
||||
bytes(self.file2, sys.getfilesystemencoding()))
|
||||
|
||||
def test_mbcs_name(self):
|
||||
self.file1 += "\u65e5\u672c"
|
||||
self.file2 = self.file1 + "2"
|
||||
self._test_link(self.file1, self.file2)
|
||||
|
||||
if sys.platform != 'win32':
|
||||
class Win32ErrorTests(unittest.TestCase):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue