From: Eric S. Raymond Date: Thu, 15 Nov 2018 18:55:10 +0000 (-0500) Subject: Coverage improvement. Also, it's rude to die silently. X-Git-Tag: 1.7~21 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=31d561b4708c96f2d42cc04b9075b414de10288d;p=open-adventure.git Coverage improvement. Also, it's rude to die silently. --- diff --git a/main.c b/main.c index 0719e8c..c68a7ed 100644 --- a/main.c +++ b/main.c @@ -1185,9 +1185,6 @@ Lookup: default: // LCOV_EXCL_LINE BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE } - if (!is_valid(game)) { - exit(1); - } switch (action(command)) { case GO_TERMINATE: return true; diff --git a/tests/illformed.chk b/tests/illformed.chk index 3c763af..03c650c 100644 --- a/tests/illformed.chk +++ b/tests/illformed.chk @@ -91,6 +91,10 @@ down a gully. I see no grate here. +> 23 + +Sorry, I don't know the word "23". + > eat building You are inside a building, a well house for a large spring. @@ -618,7 +622,7 @@ Okay, "boo". > score -You have garnered 27 out of a possible 430 points, using 117 turns. +You have garnered 27 out of a possible 430 points, using 118 turns. > z @@ -626,7 +630,7 @@ OK > score -You have garnered 27 out of a possible 430 points, using 119 turns. +You have garnered 27 out of a possible 430 points, using 120 turns. > quit keys diff --git a/tests/illformed.log b/tests/illformed.log index 09ecb52..59315fe 100644 --- a/tests/illformed.log +++ b/tests/illformed.log @@ -16,6 +16,7 @@ back seed waste eat grate +23 eat building in # Z'ZZZ Word correct, but does nothing