| 628 | self.assertEqual(f'X.Y.exe -prearg "{script}" -postarg', data["stdout"].strip()) |
| 629 | |
| 630 | def test_py_shebang_valid_bom(self): |
| 631 | with self.py_ini(TEST_PY_DEFAULTS): |
| 632 | content = "#! /usr/bin/python -prearg".encode("utf-8") |
| 633 | with self.script(b"\xEF\xBB\xBF" + content) as script: |
| 634 | data = self.run_py([script, "-postarg"]) |
| 635 | self.assertEqual("PythonTestSuite", data["SearchInfo.company"]) |
| 636 | self.assertEqual("3.100", data["SearchInfo.tag"]) |
| 637 | self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip()) |
| 638 | |
| 639 | def test_py_shebang_invalid_bom(self): |
| 640 | with self.py_ini(TEST_PY_DEFAULTS): |