Save/resume fail test coverage -- test works in Docker now 110/head
authorAaron Traas <aaron@traas.org>
Mon, 19 Jun 2017 17:09:15 +0000 (13:09 -0400)
committerAaron Traas <aaron@traas.org>
Mon, 19 Jun 2017 17:09:15 +0000 (13:09 -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..27f8271
--- /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 /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..053b05f
--- /dev/null
@@ -0,0 +1,6 @@
+## Resume from invalid filename
+n
+seed 1240742801
+resume
+y
+/badfilename
\ No newline at end of file
diff --git a/tests/savefail.chk b/tests/savefail.chk
new file mode 100644 (file)
index 0000000..7bce9d0
--- /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 /, 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..f907d99
--- /dev/null
@@ -0,0 +1,6 @@
+## Save right after starting to invalid filename
+n
+seed 1240742801
+save
+y
+/
\ No newline at end of file