Add script for generating codetester cases from in/out files

This commit is contained in:
Arne Keller 2020-03-05 21:54:38 +01:00
parent c0f22b2697
commit 72b76fbeb6
2 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
out
testcase*

View File

@ -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("<e")
else:
print(line, end="")