From: Eric S. Raymond Date: Sat, 3 Jun 2017 10:28:00 +0000 (-0400) Subject: Add some tests that increase test coverage to add cases. X-Git-Tag: 0.90~26 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4874fce5c7ddae3f62480a8a034c6537192726b4;p=open-adventure.git Add some tests that increase test coverage to add cases. Proof of concept. More could be added in illformed.log. --- diff --git a/tests/illformed.chk b/tests/illformed.chk new file mode 100644 index 0000000..d960af5 --- /dev/null +++ b/tests/illformed.chk @@ -0,0 +1,95 @@ + +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 1801426495 +Seed set to 1801426495 + +You're in front of building. + +> in + +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. + +> carry + +Carry what? + +> blast + +Blasting requires dynamite. + +> throw axe + +I see no axe here. + +> throw knife + +I see no knife here. + +> lock + +There is nothing here with a lock! + +> unlock + +There is nothing here with a lock! + +> throw + +Throw what? + +> unlock chain + +I see no chain here. + +> fill urn + +I see no urn here. + +> eat keys + +Don't be ridiculous! + +> drink blood + +I see no blood here. + +> quit + +Do you really want to quit now? + +> n + +OK + +> score + +You have garnered 32 out of a possible 430 points, using 14 turns. + +> quit + +Do you really want to quit now? + +> yes + +OK + +You scored 32 out of a possible 430, using 15 turns. + +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/illformed.log b/tests/illformed.log new file mode 100644 index 0000000..9c9f6a3 --- /dev/null +++ b/tests/illformed.log @@ -0,0 +1,20 @@ +## Test for various cases not found in walkthroughs. +n +seed 1801426495 +in +carry +blast +throw axe +throw knife +lock +unlock +throw +unlock chain +fill urn +eat keys +drink blood +quit +n +score +quit +yes