X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=tests%2FMakefile;fp=tests%2FMakefile;h=8d61d27109c6d33143f76a8370b581e29a8619f7;hp=f2addb991dbc0e1fa6dfb1407417227c9aa04705;hb=dc8b19bcdc00586af906af4147855662efb5287e;hpb=2070db3a2a2332bb85aa9de739c9ff6c1101719b diff --git a/tests/Makefile b/tests/Makefile index f2addb9..8d61d27 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -133,11 +133,23 @@ count: # The diff file produced has corrected spellings in it. That's what oldfilter # is for, to massage out the orioginal dpellings and avoid noise diffs. # Diffs in amount of whitespace and trailing whitespace are ignored - +# +# A magic comment of NOCOMPARE in a log file excludes it from this comparison. +# First use of this is to avoid a spurious mismatch on the news text. +TAPFILTER=tapview ancient: $(SGAMES) @if [ -f ../advent430 ]; then cp ../advent430 ../adventure.data .; else echo "advent430 nonexistent"; exit 1; fi - @-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}; legend=$$(sed -n '/^## /s///p' <$$x 2>/dev/null || echo "(no description)"); ./newfilter <$${stem}.chk | tapdiffer -w "$${legend}" $${stem}.ochk; done; echo 1..$(words $(shell ls *.log))) | tapview + @-(for x in *.log; do \ + stem=$${x%.log}; \ + legend=$$(sed -n '/^## /s///p' <$$x 2>/dev/null || echo "(no description)"); \ + if grep NOCOMPARE $$x >/dev/null; \ + then echo "not ok - $${stem}.ochk: $${legend} # SKIP"; \ + else \ + ./advent430 <$${stem}.log | oldfilter >$${stem}.ochk; \ + ./newfilter <$${stem}.chk | tapdiffer -w "$${stem}: $${legend}" $${stem}.ochk; \ + fi; \ + done; \ + echo 1..$(words $(shell ls *.log))) | $(TAPFILTER) @rm *.ochk advent430 adventure.data # end