Add cleanup and better formatting

multiline-output
drunkendog 2023-09-12 14:10:27 +01:00
parent 906c9df10d
commit d8ca74e6b1
1 changed files with 2 additions and 1 deletions

View File

@ -25,3 +25,4 @@ for file_name in glob.glob("*.c", recursive=False):
x_split = x.split("\n")
return_data = subprocess.run(["./a.out"], input=x_split[0].rstrip().encode(), capture_output=True).stdout.decode().rstrip()
print(f"\u001b[{31 + int(return_data == x_split[1].rstrip())}m{return_data}\u001b[0m", x[1])
os.remove("a.out")