Test Coverage -- lots of new pieces of actions.c
This commit is contained in:
parent
22613f06fa
commit
67ed99b29c
12 changed files with 3315 additions and 5 deletions
|
@ -45,6 +45,12 @@ has scrawled, "MAGIC WORD XYZZY".
|
|||
|
||||
A three foot black rod with a rusty star on an end lies nearby.
|
||||
|
||||
> eat grate
|
||||
|
||||
You're in debris room.
|
||||
|
||||
A three foot black rod with a rusty star on an end lies nearby.
|
||||
|
||||
> w
|
||||
|
||||
You are in an awkward sloping east/west canyon.
|
||||
|
@ -62,7 +68,7 @@ A cheerful little bird is sitting here singing.
|
|||
You can catch the bird, but you cannot carry it.
|
||||
|
||||
|
||||
You scored 32 out of a possible 430, using 7 turns.
|
||||
You scored 32 out of a possible 430, using 8 turns.
|
||||
|
||||
You are obviously a rank amateur. Better luck next time.
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ in
|
|||
take lamp
|
||||
xyzzy
|
||||
on
|
||||
eat grate
|
||||
w
|
||||
w
|
||||
take bird
|
||||
|
|
1602
tests/chainrelock.chk
Normal file
1602
tests/chainrelock.chk
Normal file
File diff suppressed because it is too large
Load diff
269
tests/chainrelock.log
Normal file
269
tests/chainrelock.log
Normal file
|
@ -0,0 +1,269 @@
|
|||
## Attempt to re-lock chain after it's already locked
|
||||
# Based on walkthrough at http://www.ecsoftwareconsulting.com/node/56
|
||||
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
|
||||
e
|
||||
e
|
||||
n
|
||||
take silver
|
||||
n
|
||||
plugh
|
||||
drop silver
|
||||
drop jewelry
|
||||
drop jade
|
||||
drop rug
|
||||
out
|
||||
s
|
||||
w
|
||||
n
|
||||
take appendage
|
||||
free bird
|
||||
listen
|
||||
s
|
||||
s
|
||||
n
|
||||
in
|
||||
take water
|
||||
plugh
|
||||
plover
|
||||
ne
|
||||
take axe
|
||||
take pyramid
|
||||
s
|
||||
plover
|
||||
s
|
||||
d
|
||||
u
|
||||
u
|
||||
throw axe
|
||||
take axe
|
||||
throw axe
|
||||
take axe
|
||||
throw axe
|
||||
take axe
|
||||
throw axe
|
||||
take axe
|
||||
s
|
||||
e
|
||||
w
|
||||
drop cage
|
||||
w
|
||||
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
|
||||
take diamonds
|
||||
e
|
||||
e
|
||||
s
|
||||
take gold
|
||||
n
|
||||
y2
|
||||
d
|
||||
plugh
|
||||
drop diamonds
|
||||
drop pyramid
|
||||
drop ruby
|
||||
plugh
|
||||
plugh
|
||||
drop coins
|
||||
plugh
|
||||
s
|
||||
d
|
||||
bedquilt
|
||||
slab
|
||||
s
|
||||
d
|
||||
water plant
|
||||
u
|
||||
w
|
||||
u
|
||||
reservoir
|
||||
Q'IBJ
|
||||
n
|
||||
n
|
||||
nw
|
||||
u
|
||||
u
|
||||
u
|
||||
u
|
||||
ne
|
||||
take ebony
|
||||
sw
|
||||
d
|
||||
d
|
||||
d
|
||||
d
|
||||
se
|
||||
s
|
||||
s
|
||||
take water
|
||||
s
|
||||
s
|
||||
d
|
||||
s
|
||||
d
|
||||
water plant
|
||||
u
|
||||
e
|
||||
d
|
||||
take oil
|
||||
u
|
||||
w
|
||||
d
|
||||
climb
|
||||
w
|
||||
n
|
||||
oil door
|
||||
n
|
||||
take trident
|
||||
w
|
||||
d
|
||||
se
|
||||
n
|
||||
w
|
||||
drop trident
|
||||
drop axe
|
||||
drop ebony
|
||||
drop bottle
|
||||
drop appendage
|
||||
drop lamp
|
||||
e
|
||||
take emerald
|
||||
w
|
||||
take lamp
|
||||
take bottle
|
||||
take ebony
|
||||
take axe
|
||||
take trident
|
||||
nw
|
||||
s
|
||||
take vase
|
||||
e
|
||||
se
|
||||
e
|
||||
take pillow
|
||||
w
|
||||
ne
|
||||
e
|
||||
n
|
||||
open clam
|
||||
s
|
||||
u
|
||||
e
|
||||
u
|
||||
n
|
||||
plugh
|
||||
drop pillo
|
||||
drop vase
|
||||
drop trident
|
||||
drop ebony
|
||||
drop emerald
|
||||
take food
|
||||
take keys
|
||||
plugh
|
||||
s
|
||||
s
|
||||
w
|
||||
take coins
|
||||
e
|
||||
n
|
||||
d
|
||||
w
|
||||
d
|
||||
n
|
||||
d
|
||||
d
|
||||
take pearl
|
||||
up
|
||||
u
|
||||
s
|
||||
w
|
||||
throw axe
|
||||
take axe
|
||||
w
|
||||
throw axe
|
||||
take axe
|
||||
w
|
||||
d
|
||||
get oil
|
||||
u
|
||||
w
|
||||
d
|
||||
climb
|
||||
w
|
||||
get eggs
|
||||
drop coins
|
||||
get eggs
|
||||
n
|
||||
n
|
||||
d
|
||||
w
|
||||
d
|
||||
sw
|
||||
up
|
||||
toss eggs
|
||||
ne
|
||||
ne
|
||||
barren
|
||||
in
|
||||
feed bear
|
||||
unlock chain
|
||||
lock chain
|
||||
lock chain
|
68
tests/magicword.chk
Normal file
68
tests/magicword.chk
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
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 1635997320
|
||||
Seed set to 1635997320
|
||||
|
||||
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.
|
||||
|
||||
> say F'UNJ
|
||||
|
||||
Nothing happens.
|
||||
|
||||
> say fee
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say fie
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say foe
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say fum
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say fee
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say fie
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say foe
|
||||
|
||||
I don't know how.
|
||||
|
||||
> say fum
|
||||
|
||||
I don't know how.
|
||||
|
||||
|
||||
You scored 32 out of a possible 430, using 10 turns.
|
||||
|
||||
You are obviously a rank amateur. Better luck next time.
|
||||
|
||||
To achieve the next higher rating, you need 14 more points.
|
13
tests/magicword.log
Normal file
13
tests/magicword.log
Normal file
|
@ -0,0 +1,13 @@
|
|||
## Say magic word at beginning to improve test coverage
|
||||
n
|
||||
seed 1635997320
|
||||
in
|
||||
say F'UNJ
|
||||
say fee
|
||||
say fie
|
||||
say foe
|
||||
say fum
|
||||
say fee
|
||||
say fie
|
||||
say foe
|
||||
say fum
|
1142
tests/oilplant.chk
Normal file
1142
tests/oilplant.chk
Normal file
File diff suppressed because it is too large
Load diff
188
tests/oilplant.log
Normal file
188
tests/oilplant.log
Normal file
|
@ -0,0 +1,188 @@
|
|||
## Attempt to oil the beanstalk after watering it
|
||||
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
|
||||
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
|
||||
u
|
||||
oil plant
|
|
@ -1969,10 +1969,18 @@ A small urn is embedded in the rock.
|
|||
|
||||
The urn is empty and will not light.
|
||||
|
||||
> fill urn
|
||||
> pour bottle
|
||||
|
||||
Your bottle is now empty and the urn is full of oil.
|
||||
|
||||
> fill bottle
|
||||
|
||||
There's no way to get the oil out of the urn.
|
||||
|
||||
> drink oil
|
||||
|
||||
Don't be ridiculous!
|
||||
|
||||
> light urn
|
||||
|
||||
The urn is now lit.
|
||||
|
@ -1995,7 +2003,7 @@ If you mean to use the persian rug, it does not appear inclined to
|
|||
cooperate.
|
||||
|
||||
|
||||
You scored 267 out of a possible 430, using 335 turns.
|
||||
You scored 267 out of a possible 430, using 337 turns.
|
||||
|
||||
You have reached "Junior Master" status.
|
||||
|
||||
|
|
|
@ -332,7 +332,10 @@ n
|
|||
n
|
||||
# Everything to here copied from endgame428
|
||||
light urn
|
||||
fill urn
|
||||
# Changed below from "fill urn" in order to test more code
|
||||
pour bottle
|
||||
fill bottle
|
||||
drink oil
|
||||
light urn
|
||||
fill urn
|
||||
read urn
|
||||
|
|
|
@ -924,6 +924,10 @@ You're in west pit.
|
|||
There is a 12-foot-tall beanstalk stretching up out of the pit,
|
||||
bellowing "WATER!! WATER!!"
|
||||
|
||||
> drink plant
|
||||
|
||||
Don't be ridiculous!
|
||||
|
||||
> u
|
||||
|
||||
You're at west end of Twopit Room.
|
||||
|
@ -1080,6 +1084,10 @@ You're in west pit.
|
|||
|
||||
There is a gigantic beanstalk stretching all the way up to the hole.
|
||||
|
||||
> oil plant
|
||||
|
||||
I see no oil here.
|
||||
|
||||
> u
|
||||
|
||||
You're at west end of Twopit Room.
|
||||
|
@ -1974,7 +1982,7 @@ A small urn is embedded in the rock.
|
|||
There is nothing here with which to fill it.
|
||||
|
||||
|
||||
You scored 267 out of a possible 430, using 330 turns.
|
||||
You scored 267 out of a possible 430, using 332 turns.
|
||||
|
||||
You have reached "Junior Master" status.
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@ slab
|
|||
s
|
||||
d
|
||||
water plant
|
||||
drink plant
|
||||
u
|
||||
w
|
||||
u
|
||||
|
@ -178,6 +179,7 @@ d
|
|||
s
|
||||
d
|
||||
water plant
|
||||
oil plant
|
||||
u
|
||||
drop appendage
|
||||
e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue