Improved test coverage -- save/resume fail
authorAaron Traas <aaron@traas.org>
Mon, 19 Jun 2017 13:25:36 +0000 (09:25 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 19 Jun 2017 15:24:46 +0000 (11:24 -0400)
tests/resumefail.chk [new file with mode: 0644]
tests/resumefail.log [new file with mode: 0644]
tests/savefail.chk [new file with mode: 0644]
tests/savefail.log [new file with mode: 0644]

diff --git a/tests/resumefail.chk b/tests/resumefail.chk
new file mode 100644 (file)
index 0000000..355fc81
--- /dev/null
@@ -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.
diff --git a/tests/resumefail.log b/tests/resumefail.log
new file mode 100644 (file)
index 0000000..04a3022
--- /dev/null
@@ -0,0 +1,6 @@
+## Save right after starting
+n
+seed 1240742801
+resume
+y
+/dev/badfilename
\ No newline at end of file
diff --git a/tests/savefail.chk b/tests/savefail.chk
new file mode 100644 (file)
index 0000000..1bd0e56
--- /dev/null
@@ -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.
diff --git a/tests/savefail.log b/tests/savefail.log
new file mode 100644 (file)
index 0000000..48a5c16
--- /dev/null
@@ -0,0 +1,6 @@
+## Save right after starting
+n
+seed 1240742801
+save
+y
+/dev/badfilename
\ No newline at end of file