This commit is contained in:
blueloveTH 2024-01-19 14:18:23 +08:00
parent 3c6243cbc5
commit 96c926e4b3

View File

@ -60,7 +60,14 @@ else:
# test interactive mode
print("[REPL Test Enabled]")
if sys.platform in ['linux', 'darwin']:
res = subprocess.run(['./main'], encoding='utf-8', input=r'''
cmd = './main'
elif sys.platform == 'win32':
cmd = 'main.exe'
else:
cmd = None
if cmd is not None:
res = subprocess.run([cmd], encoding='utf-8', input=r'''
def add(a, b):
return a + b