From a2116b3d79d2c9cb1defdf83acb69f7efec18bbe Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 6 Apr 2022 07:54:20 -0400 Subject: [PATCH] Add test for correct listen behavior. --- tests/listen.chk | 172 +++++++++++++++++++++++++++++++++++++++++++++++ tests/listen.log | 25 +++++++ 2 files changed, 197 insertions(+) create mode 100644 tests/listen.chk create mode 100644 tests/listen.log diff --git a/tests/listen.chk b/tests/listen.chk new file mode 100644 index 0000000..c9b2be4 --- /dev/null +++ b/tests/listen.chk @@ -0,0 +1,172 @@ + +Welcome to Adventure!! Would you like instructions? + +> no + +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 1181530211 + +Seed set to 1181530211 + +You're in front of building. + +> e + +You are inside a building, a well house for a large spring. + +There are some keys on the ground here. + +There is a shiny brass lamp nearby. + +There is food here. + +There is a bottle of water here. + +> get lamp + +OK + +> xyzzy + +>>Foof!<< + +It is now pitch dark. If you proceed you will likely fall into a pit. + +> on + +Your lamp is now on. + +You are in a debris room filled with stuff washed in from the surface. +A low wide passage with cobbles becomes plugged with mud and debris +here, but an awkward canyon leads upward and west. In the mud someone +has scrawled, "MAGIC WORD XYZZY". + +A three foot black rod with a rusty star on an end lies nearby. + +> e + +You are crawling over cobbles in a low passage. There is a dim light +at the east end of the passage. + +There is a small wicker cage discarded nearby. + +> get cage + +OK + +> pit + +At your feet is a small pit breathing traces of white mist. An east +passage ends here except for a small crack leading on. + +Rough stone steps lead down the pit. + +> e + +You are in a splendid chamber thirty feet high. The walls are frozen +rivers of orange stone. An awkward canyon and a good passage exit +from east and west sides of the chamber. + +A cheerful little bird is sitting here singing. + +> get bird + +OK + +> debri + +You're in debris room. + +A three foot black rod with a rusty star on an end lies nearby. + +> xyzzy + +>>Foof!<< + +You're inside building. + +There are some keys on the ground here. + +There is food here. + +There is a bottle of water here. + +> listen + +The stream is gurgling placidly. + +The bird does not seem inclined to sing while in the cage. + +> xyzzy + +>>Foof!<< + +You're in debris room. + +A three foot black rod with a rusty star on an end lies nearby. + +> pit + +You're at top of small pit. + +Rough stone steps lead down the pit. + +> d + +You are at one end of a vast hall stretching forward out of sight to +the west. There are openings to either side. Nearby, a wide stone +staircase leads downward. The hall is filled with wisps of white mist +swaying to and fro almost as if alive. A cold wind blows up the +staircase. There is a passage at the top of a dome behind you. + +Rough stone steps lead up the dome. + +> d + +You are in the Hall of the Mountain King, with passages off in all +directions. + +A huge green fierce snake bars the way! + +> listen + +The bird does not seem inclined to sing while in the cage. + +The snake is hissing venomously. + +> secret + +You are in a secret canyon which here runs e/w. It crosses over a +very tight canyon 15 feet below. If you go down you may not be able +to get back up. + +> w + +You are in a secret canyon which exits to the north and east. + +A huge green fierce dragon bars the way! + +The dragon is sprawled out on a Persian rug!! + +> listen + +The bird does not seem inclined to sing while in the cage. + +The dragon's ominous hissing does not bode well for you. + +> quit + +Do you really want to quit now? + +> yes + +OK + +You scored 59 out of a possible 430, using 21 turns. + +Your score qualifies you as a novice class adventurer. + +To achieve the next higher rating, you need 62 more points. diff --git a/tests/listen.log b/tests/listen.log new file mode 100644 index 0000000..135fdbc --- /dev/null +++ b/tests/listen.log @@ -0,0 +1,25 @@ +## Check that listen command hears all objects as well as location sound +no +seed 1181530211 +e +get lamp +xyzzy +on +e +get cage +pit +e +get bird +debri +xyzzy +listen +xyzzy +pit +d +d +listen +secret +w +listen +quit +yes -- 2.31.1