Skip to content

Commit 8730051

Browse files
committed
Add test for bat file quoting issue. NFC
See microsoft/terminal#15212
1 parent 88a8d74 commit 8730051

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_other.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15083,6 +15083,18 @@ def test_no_extra_output(self):
1508315083
output = self.run_process([EMCC, '-c', test_file('hello_world.c')], stdout=PIPE, stderr=STDOUT).stdout
1508415084
self.assertEqual(output, '')
1508515085

15086+
@crossplatform
15087+
def test_bat_file_bug(self):
15088+
# See https://github.com/microsoft/terminal/issues/15212
15089+
file = test_file('hello_world.c')
15090+
cmd = f'"emcc" -c {file}'
15091+
old_path = os.environ['PATH']
15092+
new_path = old_path + os.pathsep + os.path.dirname(EMCC)
15093+
with env_modify({'PATH': new_path}):
15094+
proc = subprocess.run(cmd, capture_output=True, text=True, shell=True, check=True)
15095+
self.assertEqual(proc.stdout, '')
15096+
self.assertEqual(proc.stderr, '')
15097+
1508615098
def test_browser_too_old(self):
1508715099
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMIN_CHROME_VERSION=10'])
1508815100
self.assertContained('emcc: error: MIN_CHROME_VERSION older than 74 is not supported', err)

0 commit comments

Comments
 (0)