Implement NOCOMPARE magic.

This commit is contained in:
Eric S. Raymond 2023-03-23 05:38:26 -04:00
parent 2070db3a2a
commit dc8b19bcdc
9 changed files with 27 additions and 7 deletions

View file

@ -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

View file

@ -1,5 +1,6 @@
## Verify that the bird is weightless in inventory
# Checks fix for GitLab issue #40
#NOCOMPARE Bird was not weightless in cage in advent430 so this test is invalid.
n
#seed 687800971
seed 976729036

View file

@ -1,5 +1,6 @@
### Check that water is unavailable in endgame
# Addresses GitLab issue #55: in endgame, some object starting states are incorrect
#NOCOMPARE Bird was not weightless in cade in advent430, this test depends on that.
no
seed 11247848
no

View file

@ -1,6 +1,7 @@
## Resume from invalid filename
#NOCOMPARE advent430 crashes on resume fom invalid filename and we don't care.
n
seed 1240742801
resume
y
/badfilename
/badfilename

View file

@ -1,4 +1,5 @@
## Resume from from generated save with version mismatch error
## Resume from from generated save with version mismatch error
#NOCOMPARE Reveals a bug in advent430 handling of saves with invalid versions.
n
resume
y

View file

@ -1,6 +1,7 @@
## Save right after starting to invalid filename
#NOCOMPARE advent430 crashes on save to invalid filename and we don't care.
n
seed 1240742801
save
y
/
/

View file

@ -1,5 +1,6 @@
## Almost win, then save
# Based on walkthrough at http://www.ecsoftwareconsulting.com/node/56
#NOCOMPARE seems to reveal a bug in advent430
n
seed 1838473132
in
@ -473,4 +474,4 @@ sw
save
y
saveresume_win.adv
y
y

View file

@ -1,6 +1,7 @@
## Resume, then win
# Here to get class threshold of 426
# Note, savefile name has trailing space
#NOCOMPARE Reveals that advent430 does not resume in endgame gracefully.
n
resume
y

View file

@ -1,4 +1,5 @@
## Test special words
#NOCOMPARE The news text has changed
n
thank
shazam