From 72b76fbeb6f01b963492c59666302d2385432bdb Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Thu, 5 Mar 2020 21:54:38 +0100 Subject: [PATCH] Add script for generating codetester cases from in/out files --- .gitignore | 1 + check_from_input_output.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 check_from_input_output.py diff --git a/.gitignore b/.gitignore index 1fcb152..59431f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ out +testcase* diff --git a/check_from_input_output.py b/check_from_input_output.py new file mode 100644 index 0000000..60691d8 --- /dev/null +++ b/check_from_input_output.py @@ -0,0 +1,16 @@ +import sys + +fuzz = sys.argv[1] + +input = open(fuzz + "_input.txt", "r") +output = open(fuzz + "_output.txt", "r") + +for line in input.readlines(): + if not line.startswith("#"): + print(">", line, end="") + +for line in output.readlines(): + if line.startswith("Error, "): + print("