Port the subseq matcher to Go

This commit is contained in:
Kovid Goyal
2023-03-12 21:11:26 +05:30
parent b088ab91cf
commit 29dd2438c9
16 changed files with 331 additions and 998 deletions

View File

@@ -172,11 +172,13 @@ def run_python_tests(args: Any, go_proc: 'Optional[subprocess.Popen[bytes]]' = N
def print_go() -> None:
try:
print(go_proc.stdout.read().decode('utf-8', 'replace'), end='', flush=True)
go_proc.wait()
except KeyboardInterrupt:
go_proc.terminate()
if go_proc.wait(0.1) is None:
go_proc.kill()
print(go_proc.stdout.read().decode('utf-8', 'replace'), end='', flush=True)
go_proc.stdout.close()
go_proc.wait()