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.
diff --git a/Lib/test/test_msilib.py b/Lib/test/test_msilib.py
index 4a233c3..743bea7 100644
--- a/Lib/test/test_msilib.py
+++ b/Lib/test/test_msilib.py
@@ -112,6 +112,16 @@
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