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