Update run-tests.py

multiline-output
drunkendog 2023-09-13 15:01:43 +01:00
parent eba8b1813c
commit ad92a53fc2
1 changed files with 1 additions and 1 deletions

View File

@ -31,6 +31,6 @@ for file_name in glob.glob("*.c", recursive=False):
test_passed_int = int(return_data == x_split[1].rstrip()) test_passed_int = int(return_data == x_split[1].rstrip())
total_tests += 1 total_tests += 1
passed_tests += test_passed_int passed_tests += test_passed_int
print(f"\u001b[{31 + test_passed_int}m{return_data}\u001b[0m", x_split[1]) print(f"({x_split[0]})", x_split[1], f"\u001b[{31 + test_passed_int}m{return_data}\u001b[0m")
print(f"\u001b[32m{passed_tests} tests passed\u001b[0m, \u001b[{31 - 31*int(total_tests == passed_tests)}m{total_tests - passed_tests} tests failed\u001b[0m") print(f"\u001b[32m{passed_tests} tests passed\u001b[0m, \u001b[{31 - 31*int(total_tests == passed_tests)}m{total_tests - passed_tests} tests failed\u001b[0m")
os.remove("a.out") os.remove("a.out")