Add splitlines to prevent newlines from messing up multiline output
parent
1941de0ded
commit
e4928c4401
|
@ -30,7 +30,7 @@ for file_name in glob.glob("*.c", recursive=False):
|
|||
for x in to_run:
|
||||
x_split = x.split("\n", 1)
|
||||
return_data = subprocess.run(["./a.out"], input=x_split[0].rstrip().encode(), capture_output=True).stdout.decode().rstrip()
|
||||
test_passed_int = int(return_data == x_split[1].rstrip())
|
||||
test_passed_int = int(return_data.rstrip().splitlines() == x_split[1].rstrip().splitlines())
|
||||
total_tests += 1
|
||||
passed_tests += test_passed_int
|
||||
print(f"\u001b[{31 + test_passed_int}m({x_split[0]})\u001b[0m")
|
||||
|
|
Loading…
Reference in New Issue