From b42d783127ed04298f326cf58abd710a80e33faf Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Thu, 12 Mar 2020 22:31:10 +0100 Subject: [PATCH] Add script to generate codetester tests --- check_from_input_output.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 check_from_input_output.py diff --git a/check_from_input_output.py b/check_from_input_output.py new file mode 100644 index 0000000..ae24dd3 --- /dev/null +++ b/check_from_input_output.py @@ -0,0 +1,25 @@ +import sys + +fuzz = sys.argv[1] + +input = open(fuzz + "_input.txt", "r") +output = open(fuzz + "_output.txt", "r") + +in_lines = input.readlines() +out_lines = output.readlines() +for i in range(0, len(in_lines)): + if not in_lines[i].startswith("#"): + print(">", in_lines[i], end="") + else: + print(in_lines[i], end="") + if out_lines[i].startswith("Error, "): + print("