Allow cheat to generate save files with bogus numbers.
[open-adventure.git] / tests / Makefile
index da0dc71f7ec4d13c7f890b432f04bde25971c38e..21fceb75071a383791d16d743fe15e47b7873b92 100644 (file)
@@ -8,9 +8,10 @@ PATH := $(realpath ..):$(realpath .):${PATH}
 # Defeat annoying behavior under Mac OS X - builtin echo doesn't do -n
 ECHO := /bin/echo
 
-all: regress
+check: regress
        @echo "=== No diff output is good news."
        @-advent -x 2>/dev/null # Get usage message into coverage tests
+       @-advent -l /dev/null <quit.log >/dev/null
 
 .SUFFIXES: .chk
 
@@ -36,6 +37,10 @@ buildregress:
        done; \
        rm -f scratch.tmp
 regress:
+       $(ECHO) -n "Generate save file with -1000 deaths: "
+       ../cheat -d -1000 -o cheat_numdie.adv
+       $(ECHO) -n "Generate save file with version -1337: "
+       ../cheat -v -1337 -o resume_badversion.adv
        @for file in $(TESTLOADS); do \
            $(ECHO) -n "  $${file} "; grep '##' $${file}.log  || echo ' ## (no description)'; \
            OPTS=`sed -n /#options:/s///p <$${file}.log`; \