Test coverage -- more corner cases in actions.c
This commit is contained in:
parent
7a3f3ec7a6
commit
89de4e4602
8 changed files with 2749 additions and 9 deletions
229
tests/flyrug.chk
Normal file
229
tests/flyrug.chk
Normal file
|
@ -0,0 +1,229 @@
|
|||
|
||||
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 1495951709
|
||||
Seed set to 1495951709
|
||||
|
||||
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.
|
||||
|
||||
> take lamp
|
||||
|
||||
OK
|
||||
|
||||
> on
|
||||
|
||||
Your lamp is now on.
|
||||
|
||||
> xyzzy
|
||||
|
||||
>>Foof!<<
|
||||
|
||||
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.
|
||||
|
||||
> take rod
|
||||
|
||||
OK
|
||||
|
||||
> 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.
|
||||
|
||||
> take cage
|
||||
|
||||
OK
|
||||
|
||||
> w
|
||||
|
||||
You're in debris room.
|
||||
|
||||
> w
|
||||
|
||||
You are in an awkward sloping east/west canyon.
|
||||
|
||||
> w
|
||||
|
||||
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.
|
||||
|
||||
> drop rod
|
||||
|
||||
OK
|
||||
|
||||
> take bird
|
||||
|
||||
OK
|
||||
|
||||
> take rod
|
||||
|
||||
OK
|
||||
|
||||
> w
|
||||
|
||||
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.
|
||||
|
||||
> free bird
|
||||
|
||||
OK
|
||||
|
||||
> wave rod
|
||||
|
||||
The bird flies about agitatedly for a moment, then disappears through
|
||||
the crack. It reappears shortly, carrying in its beak a jade
|
||||
necklace, which it drops at your feet.
|
||||
|
||||
> take jade
|
||||
|
||||
OK
|
||||
|
||||
> drop rod
|
||||
|
||||
OK
|
||||
|
||||
> take bird
|
||||
|
||||
OK
|
||||
|
||||
> take rod
|
||||
|
||||
OK
|
||||
|
||||
> 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.
|
||||
|
||||
> w
|
||||
|
||||
You are on the east bank of a fissure slicing clear across the hall.
|
||||
The mist is quite thick here, and the fissure is too wide to jump.
|
||||
|
||||
> wave rod
|
||||
|
||||
The bird flies agitatedly about the cage.
|
||||
|
||||
A crystal bridge now spans the fissure.
|
||||
|
||||
> drop rod
|
||||
|
||||
OK
|
||||
|
||||
> e
|
||||
|
||||
You're in Hall of Mists.
|
||||
|
||||
Rough stone steps lead up the dome.
|
||||
|
||||
> n
|
||||
|
||||
You are in the Hall of the Mountain King, with passages off in all
|
||||
directions.
|
||||
|
||||
A huge green fierce snake bars the way!
|
||||
|
||||
> free bird
|
||||
|
||||
The little bird attacks the green snake, and in an astounding flurry
|
||||
drives the snake away.
|
||||
|
||||
> take bird
|
||||
|
||||
OK
|
||||
|
||||
> s
|
||||
|
||||
You are in the south side chamber.
|
||||
|
||||
There is precious jewelry here!
|
||||
|
||||
> take jewelry
|
||||
|
||||
OK
|
||||
|
||||
> n
|
||||
|
||||
You're in Hall of Mt King.
|
||||
|
||||
> sw
|
||||
|
||||
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!!
|
||||
|
||||
> kill dragon
|
||||
|
||||
With what? Your bare hands?
|
||||
|
||||
> yes
|
||||
|
||||
Congratulations! You have just vanquished a dragon with your bare
|
||||
hands! (Unbelievable, isn't it?)
|
||||
|
||||
You are in a secret canyon which exits to the north and east.
|
||||
|
||||
There is a persian rug spread out on the floor!
|
||||
|
||||
The blood-specked body of a huge green dead dragon lies to one side.
|
||||
|
||||
> drink blood
|
||||
|
||||
Your head buzzes strangely for a moment.
|
||||
|
||||
> take rug
|
||||
|
||||
OK
|
||||
|
||||
> fly rug
|
||||
|
||||
The rug does not appear inclined to cooperate.
|
||||
|
||||
|
||||
You scored 63 out of a possible 430, using 37 turns.
|
||||
|
||||
Your score qualifies you as a novice class adventurer.
|
||||
|
||||
To achieve the next higher rating, you need 58 more points.
|
41
tests/flyrug.log
Normal file
41
tests/flyrug.log
Normal file
|
@ -0,0 +1,41 @@
|
|||
## transitive fly rug test
|
||||
n
|
||||
seed 1495951709
|
||||
in
|
||||
take lamp
|
||||
on
|
||||
xyzzy
|
||||
take rod
|
||||
e
|
||||
take cage
|
||||
w
|
||||
w
|
||||
w
|
||||
drop rod
|
||||
take bird
|
||||
take rod
|
||||
w
|
||||
free bird
|
||||
wave rod
|
||||
take jade
|
||||
drop rod
|
||||
take bird
|
||||
take rod
|
||||
d
|
||||
w
|
||||
wave rod
|
||||
drop rod
|
||||
e
|
||||
n
|
||||
free bird
|
||||
take bird
|
||||
s
|
||||
take jewelry
|
||||
n
|
||||
sw
|
||||
w
|
||||
kill dragon
|
||||
yes
|
||||
drink blood
|
||||
take rug
|
||||
fly rug
|
|
@ -31,6 +31,10 @@ Seed set to 1801426495
|
|||
|
||||
You're in front of building.
|
||||
|
||||
> eat grate
|
||||
|
||||
You're in front of building.
|
||||
|
||||
> in
|
||||
|
||||
You are inside a building, a well house for a large spring.
|
||||
|
@ -105,7 +109,9 @@ You're in front of building.
|
|||
I don't know where the cave is, but hereabouts no stream can run on
|
||||
the surface for long. I would try the stream.
|
||||
|
||||
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.
|
||||
|
||||
> enter stream
|
||||
|
||||
|
@ -127,9 +133,7 @@ Carry what?
|
|||
|
||||
I am unsure how you are facing. Use compass points or nearby objects.
|
||||
|
||||
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
|
||||
|
||||
|
@ -435,7 +439,7 @@ Okay, "BOO".
|
|||
|
||||
> score
|
||||
|
||||
You have garnered 27 out of a possible 430 points, using 85 turns.
|
||||
You have garnered 27 out of a possible 430 points, using 86 turns.
|
||||
|
||||
> quit keys
|
||||
|
||||
|
@ -449,7 +453,7 @@ Do you really want to quit now?
|
|||
|
||||
OK
|
||||
|
||||
You scored 27 out of a possible 430, using 87 turns.
|
||||
You scored 27 out of a possible 430, using 88 turns.
|
||||
|
||||
You are obviously a rank amateur. Better luck next time.
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
foo
|
||||
y
|
||||
seed 1801426495
|
||||
eat grate
|
||||
in
|
||||
throw food
|
||||
nothing food
|
||||
|
|
|
@ -2467,9 +2467,136 @@ southward passage.
|
|||
You sift your fingers through the dust, but succeed only in
|
||||
obliterating the cryptic message.
|
||||
|
||||
> n
|
||||
|
||||
You scored 343 out of a possible 430, using 400 turns.
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
A sepulchral voice reverberating through the cave, says, "Cave closing
|
||||
soon. All adventurers exit immediately through main office."
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Dead end
|
||||
|
||||
There is a massive vending machine here, swung back to reveal a
|
||||
southward passage.
|
||||
|
||||
> n
|
||||
|
||||
You are in a little maze of twisting passages, all different.
|
||||
|
||||
> s
|
||||
|
||||
Your lamp has run out of power.
|
||||
|
||||
It is now pitch dark. If you proceed you will likely fall into a pit.
|
||||
|
||||
> lamp on
|
||||
|
||||
Your lamp has run out of power.
|
||||
|
||||
|
||||
You scored 368 out of a possible 430, using 423 turns.
|
||||
|
||||
Your score puts you in Master Adventurer Class C.
|
||||
|
||||
To achieve the next higher rating, you need 33 more points.
|
||||
To achieve the next higher rating, you need 8 more points.
|
||||
|
|
|
@ -403,4 +403,27 @@ s
|
|||
sw
|
||||
se
|
||||
s
|
||||
carry message
|
||||
carry message
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
n
|
||||
s
|
||||
lamp on
|
1981
tests/urntest2.chk
Normal file
1981
tests/urntest2.chk
Normal file
File diff suppressed because it is too large
Load diff
334
tests/urntest2.log
Normal file
334
tests/urntest2.log
Normal file
|
@ -0,0 +1,334 @@
|
|||
## Test filling urn when you have no bottle
|
||||
n
|
||||
seed 1838473132
|
||||
in
|
||||
take lamp
|
||||
xyzzy
|
||||
on
|
||||
take rod
|
||||
e
|
||||
take cage
|
||||
w
|
||||
w
|
||||
w
|
||||
drop rod
|
||||
take bird
|
||||
take rod
|
||||
w
|
||||
free bird
|
||||
wave rod
|
||||
take necklace
|
||||
drop rod
|
||||
take bird
|
||||
take rod
|
||||
d
|
||||
d
|
||||
free bird
|
||||
drop rod
|
||||
drop cage
|
||||
take cage
|
||||
take bird
|
||||
w
|
||||
take coins
|
||||
e
|
||||
s
|
||||
take jewelry
|
||||
n
|
||||
up
|
||||
s
|
||||
take gold
|
||||
n
|
||||
d
|
||||
n
|
||||
n
|
||||
plugh
|
||||
extinguish lamp
|
||||
drop coins
|
||||
drop jewelry
|
||||
drop necklace
|
||||
drop gold
|
||||
plugh
|
||||
on
|
||||
s
|
||||
take silver
|
||||
s
|
||||
sw
|
||||
take axe
|
||||
w
|
||||
kill dragon
|
||||
yes
|
||||
drink blood
|
||||
take rug
|
||||
e
|
||||
e
|
||||
up
|
||||
d
|
||||
n
|
||||
n
|
||||
off
|
||||
plugh
|
||||
inven
|
||||
drop rug
|
||||
drop silver
|
||||
out
|
||||
s
|
||||
w
|
||||
n
|
||||
take appendage
|
||||
free bird
|
||||
drop cage
|
||||
listen
|
||||
s
|
||||
s
|
||||
n
|
||||
in
|
||||
take water
|
||||
plugh
|
||||
on
|
||||
plover
|
||||
ne
|
||||
take pyramid
|
||||
s
|
||||
plover
|
||||
s
|
||||
s
|
||||
take rod
|
||||
up
|
||||
w
|
||||
wave rod
|
||||
drop rod
|
||||
west
|
||||
take diamonds
|
||||
w
|
||||
w
|
||||
w
|
||||
s
|
||||
sw
|
||||
se
|
||||
s
|
||||
kill machine
|
||||
s
|
||||
s
|
||||
kill ogre
|
||||
n
|
||||
take ruby
|
||||
s
|
||||
w
|
||||
n
|
||||
n
|
||||
n
|
||||
nw
|
||||
d
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
throw axe
|
||||
take axe
|
||||
n
|
||||
n
|
||||
n
|
||||
off
|
||||
plugh
|
||||
drop ruby
|
||||
drop diamonds
|
||||
drop pyramid
|
||||
plugh
|
||||
on
|
||||
s
|
||||
s
|
||||
u
|
||||
n
|
||||
n
|
||||
d
|
||||
bedquilt
|
||||
throw axe
|
||||
take axe
|
||||
slab
|
||||
s
|
||||
d
|
||||
water plant
|
||||
u
|
||||
w
|
||||
u
|
||||
reservoir
|
||||
H'CFL
|
||||
n
|
||||
n
|
||||
nw
|
||||
u
|
||||
u
|
||||
u
|
||||
u
|
||||
ne
|
||||
take ebony
|
||||
sw
|
||||
d
|
||||
d
|
||||
d
|
||||
d
|
||||
d
|
||||
take water
|
||||
s
|
||||
s
|
||||
s
|
||||
s
|
||||
d
|
||||
s
|
||||
d
|
||||
water plant
|
||||
u
|
||||
drop appendage
|
||||
e
|
||||
d
|
||||
get oil
|
||||
u
|
||||
w
|
||||
d
|
||||
climb
|
||||
w
|
||||
n
|
||||
oil door
|
||||
drop bottle
|
||||
n
|
||||
take trident
|
||||
w
|
||||
d
|
||||
se
|
||||
n
|
||||
w
|
||||
drop trident
|
||||
drop ebony
|
||||
drop axe
|
||||
drop lantern
|
||||
e
|
||||
take emerald
|
||||
w
|
||||
take lamp
|
||||
take axe
|
||||
take ebony
|
||||
take trident
|
||||
nw
|
||||
s
|
||||
take vase
|
||||
se
|
||||
throw axe
|
||||
take axe
|
||||
e
|
||||
take pillow
|
||||
w
|
||||
drop axe
|
||||
ne
|
||||
e
|
||||
n
|
||||
open clam
|
||||
s
|
||||
u
|
||||
e
|
||||
u
|
||||
n
|
||||
off
|
||||
plugh
|
||||
drop pillow
|
||||
drop vase
|
||||
drop trident
|
||||
drop emerald
|
||||
drop ebony
|
||||
take keys
|
||||
take food
|
||||
plugh
|
||||
on
|
||||
s
|
||||
d
|
||||
w
|
||||
d
|
||||
n
|
||||
d
|
||||
d
|
||||
take pearl
|
||||
u
|
||||
u
|
||||
s
|
||||
w
|
||||
w
|
||||
w
|
||||
w
|
||||
d
|
||||
climb
|
||||
w
|
||||
get eggs
|
||||
n
|
||||
take bottle
|
||||
n
|
||||
w
|
||||
d
|
||||
sw
|
||||
u
|
||||
toss eggs
|
||||
ne
|
||||
ne
|
||||
barren
|
||||
in
|
||||
feed bear
|
||||
unlock chain
|
||||
take chain
|
||||
take bear
|
||||
fork
|
||||
ne
|
||||
e
|
||||
take spices
|
||||
drop keys
|
||||
fork
|
||||
w
|
||||
w
|
||||
sw
|
||||
free bear
|
||||
inven
|
||||
sw
|
||||
sw
|
||||
d
|
||||
se
|
||||
se
|
||||
w
|
||||
d
|
||||
get oil
|
||||
up
|
||||
e
|
||||
take axe
|
||||
w
|
||||
w
|
||||
d
|
||||
climb
|
||||
w
|
||||
fee
|
||||
fie
|
||||
foe
|
||||
foo
|
||||
take eggs
|
||||
s
|
||||
d
|
||||
u
|
||||
w
|
||||
u
|
||||
s
|
||||
e
|
||||
e
|
||||
n
|
||||
n
|
||||
off
|
||||
plugh
|
||||
drop eggs
|
||||
drop pearl
|
||||
drop spices
|
||||
drop chain
|
||||
take rug
|
||||
take ruby
|
||||
take emerald
|
||||
out
|
||||
w
|
||||
n
|
||||
n
|
||||
drop bottle
|
||||
n
|
||||
fill urn
|
Loading…
Add table
Add a link
Reference in a new issue