bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195)

* The path to the CAB file can be non-ASCII.
* Paths of added files can be non-ASCII.
This commit is contained in:
Serhiy Storchaka 2020-06-30 11:56:03 +03:00 committed by GitHub
parent 694d31e714
commit ba67d7386e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 12 deletions

View file

@ -112,6 +112,16 @@ class MsiDatabaseTestCase(unittest.TestCase):
with self.assertRaises(msilib.MSIError):
si.GetProperty(-1)
def test_FCICreate(self):
filepath = TESTFN + '.txt'
cabpath = TESTFN + '.cab'
self.addCleanup(unlink, filepath)
with open(filepath, 'wb'):
pass
self.addCleanup(unlink, cabpath)
msilib.FCICreate(cabpath, [(filepath, 'test.txt')])
self.assertTrue(os.path.isfile(cabpath))
class Test_make_id(unittest.TestCase):
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx