From 9b89dd2829c4d8315f35e2d80b44542c3f2b4115 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 14 Mar 2023 11:35:57 -0400 Subject: [PATCH] Experimental test production. --- tests/Makefile | 10 +++++++++- tests/oldfilter | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 tests/oldfilter diff --git a/tests/Makefile b/tests/Makefile index e33e684..8ea00c6 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -36,7 +36,7 @@ check: savecheck .SUFFIXES: .chk clean: - rm -fr *~ adventure.text *.adv scratch.tmp + rm -fr *~ *.adv scratch.tmp *.ochk # Show summary lines for all tests. testlist: @@ -114,4 +114,12 @@ tap: count $(TEST_TARGETS) count: @echo 1..$(words $(TEST_TARGETS)) +# The following machinery tests the gane against a binary made from the advent430 branch +# The diff file produced has new spellings in it. + +ancient: + for x in *.log; do stem=$${x%.log}; echo $${stem}; ./advent430 <$${stem}.log | ./oldfilter >$${stem}.ochk; done + for x in *.log; do stem=$${x%.log}; diff -u $${stem}.chk $${stem}.log; done + rm *.ochk + # end diff --git a/tests/oldfilter b/tests/oldfilter new file mode 100755 index 0000000..a321792 --- /dev/null +++ b/tests/oldfilter @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Filter the output from advent430 to make it compatible with +# newer ones +sed \ + -e '/ *$/s///' \ + -e '/bridge now spans the fissure/s//bridge spans the fissure/' \ + -e '/imbedded/s//embedded/' \ + -e '/persian/s//Persian/' \ + -e '/swiss/s//Swiss/' \ + -e '/eying/s//eyeing/' \ + -e '/swiss/s//Swiss/' \ + -e '/thresholds/s//threshholds/' \ + + +#end + -- 2.31.1