From 30a98cc9164c7edea2744dac2100d2aa667903cd Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 30 Mar 2023 00:54:13 -0400 Subject: [PATCH] Factor out the test of the bare word "seed". --- tests/illformed.chk | 18 ++++++------------ tests/illformed.log | 1 - tests/seedless.chk | 21 +++++++++++++++++++++ tests/seedless.log | 4 ++++ 4 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 tests/seedless.chk create mode 100644 tests/seedless.log diff --git a/tests/illformed.chk b/tests/illformed.chk index 2f9cad3..7d8bdae 100644 --- a/tests/illformed.chk +++ b/tests/illformed.chk @@ -73,19 +73,11 @@ Sorry, but I no longer seem to remember how it was you got here. You're in front of building. -> seed - -This command requires a numeric argument. - -You're in front of building. - > waste This command requires a numeric argument. -You are standing at the end of a road before a small brick building. -Around you is a forest. A small stream flows out of the building and -down a gully. +You're in front of building. > eat grate @@ -238,7 +230,9 @@ There is a bottle of water here. > out -You're in front of building. +You are standing at the end of a road before a small brick building. +Around you is a forest. A small stream flows out of the building and +down a gully. > stream @@ -622,7 +616,7 @@ Okay, "boo". > score -You have garnered 27 out of a possible 430 points, using 118 turns. +You have garnered 27 out of a possible 430 points, using 117 turns. > z @@ -630,7 +624,7 @@ OK > score -You have garnered 27 out of a possible 430 points, using 120 turns. +You have garnered 27 out of a possible 430 points, using 119 turns. > quit keys diff --git a/tests/illformed.log b/tests/illformed.log index 59315fe..08fef09 100644 --- a/tests/illformed.log +++ b/tests/illformed.log @@ -13,7 +13,6 @@ say rub say grate _ back -seed waste eat grate 23 diff --git a/tests/seedless.chk b/tests/seedless.chk new file mode 100644 index 0000000..d921b5f --- /dev/null +++ b/tests/seedless.chk @@ -0,0 +1,21 @@ + +Welcome to Adventure!! Would you like instructions? + +> n + +You are standing at the end of a road before a small brick building. +Around you is a forest. A small stream flows out of the building and +down a gully. + +> seed + +This command requires a numeric argument. + +You're in front of building. + +> +You scored 32 out of a possible 430, using 1 turn. + +You are obviously a rank amateur. Better luck next time. + +To achieve the next higher rating, you need 14 more points. diff --git a/tests/seedless.log b/tests/seedless.log new file mode 100644 index 0000000..7c219f6 --- /dev/null +++ b/tests/seedless.log @@ -0,0 +1,4 @@ +# Check that argumentless seed command throws an error +#NOCOMPARE The word "seed" alone is mot recognized in advent430 +n +seed -- 2.31.1