#3705: Fix crash when given a non-ascii value on the command line for the "-c" and "-m" parameters

Second part, for Windows.

Reviewed by Antoine Pitrou
This commit is contained in:
Amaury Forgeot d'Arc 2008-09-09 07:04:36 +00:00
parent f7bfcfbb68
commit 14b785192b
4 changed files with 33 additions and 27 deletions

View file

@ -135,6 +135,12 @@ class CmdLineTest(unittest.TestCase):
self.exit_code('-c', 'pass'),
0)
# Test handling of non-ascii data
command = "assert(ord('\xe9') == 0xe9)"
self.assertEqual(
self.exit_code('-c', command),
0)
def test_main():
test.support.run_unittest(CmdLineTest)