Improved test coverage -- save/resume fail

This commit is contained in:
Aaron Traas 2017-06-19 09:25:36 -04:00 committed by Eric S. Raymond
parent 4c100261c4
commit e5b6f71d7a
4 changed files with 79 additions and 0 deletions

33
tests/resumefail.chk Normal file
View file

@ -0,0 +1,33 @@
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 1240742801
Seed set to 1240742801
You're in front of building.
> resume
To resume an earlier Adventure, you must abandon the current one.
Is this acceptable?
> y
OK
Can't open file /dev/badfilename, try again.
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.

6
tests/resumefail.log Normal file
View file

@ -0,0 +1,6 @@
## Save right after starting
n
seed 1240742801
resume
y
/dev/badfilename

34
tests/savefail.chk Normal file
View file

@ -0,0 +1,34 @@
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 1240742801
Seed set to 1240742801
You're in front of building.
> save
I can suspend your Adventure for you so that you can resume later, but
it will cost you 5 points.
Is this acceptable?
> y
OK
Can't open file /dev/badfilename, try again.
You're in front of building.
You scored 27 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 19 more points.

6
tests/savefail.log Normal file
View file

@ -0,0 +1,6 @@
## Save right after starting
n
seed 1240742801
save
y
/dev/badfilename