@@ -515,6 +515,30 @@ def test_py3_shebang(self):
515
515
self .assertEqual ("3.100-arm64" , data ["SearchInfo.tag" ])
516
516
self .assertEqual (f"X.Y-arm64.exe -X fake_arg_for_test -prearg { script } -postarg" , data ["stdout" ].strip ())
517
517
518
+ def test_py_shebang_nl (self ):
519
+ with self .py_ini (TEST_PY_COMMANDS ):
520
+ with self .script ("#! /usr/bin/env python -prearg\n " ) as script :
521
+ data = self .run_py ([script , "-postarg" ])
522
+ self .assertEqual ("PythonTestSuite" , data ["SearchInfo.company" ])
523
+ self .assertEqual ("3.100" , data ["SearchInfo.tag" ])
524
+ self .assertEqual (f"X.Y.exe -prearg { script } -postarg" , data ["stdout" ].strip ())
525
+
526
+ def test_py2_shebang_nl (self ):
527
+ with self .py_ini (TEST_PY_COMMANDS ):
528
+ with self .script ("#! /usr/bin/env python2 -prearg\n " ) as script :
529
+ data = self .run_py ([script , "-postarg" ])
530
+ self .assertEqual ("PythonTestSuite" , data ["SearchInfo.company" ])
531
+ self .assertEqual ("3.100-32" , data ["SearchInfo.tag" ])
532
+ self .assertEqual (f"X.Y-32.exe -prearg { script } -postarg" , data ["stdout" ].strip ())
533
+
534
+ def test_py3_shebang_nl (self ):
535
+ with self .py_ini (TEST_PY_COMMANDS ):
536
+ with self .script ("#! /usr/bin/env python3 -prearg\n " ) as script :
537
+ data = self .run_py ([script , "-postarg" ])
538
+ self .assertEqual ("PythonTestSuite" , data ["SearchInfo.company" ])
539
+ self .assertEqual ("3.100-arm64" , data ["SearchInfo.tag" ])
540
+ self .assertEqual (f"X.Y-arm64.exe -X fake_arg_for_test -prearg { script } -postarg" , data ["stdout" ].strip ())
541
+
518
542
def test_install (self ):
519
543
data = self .run_py (["-V:3.10" ], env = {"PYLAUNCHER_ALWAYS_INSTALL" : "1" }, expect_returncode = 111 )
520
544
cmd = data ["stdout" ].strip ()
0 commit comments