From 18a9be501ff8f0c57c5d540d0f5cd080c0438cd0 Mon Sep 17 00:00:00 2001 From: Aaron Traas Date: Mon, 19 Jun 2017 13:09:15 -0400 Subject: [PATCH] Save/resume fail test coverage -- test works in Docker now --- tests/resumefail.chk | 33 +++++++++++++++++++++++++++++++++ tests/resumefail.log | 6 ++++++ tests/savefail.chk | 34 ++++++++++++++++++++++++++++++++++ tests/savefail.log | 6 ++++++ 4 files changed, 79 insertions(+) create mode 100644 tests/resumefail.chk create mode 100644 tests/resumefail.log create mode 100644 tests/savefail.chk create mode 100644 tests/savefail.log diff --git a/tests/resumefail.chk b/tests/resumefail.chk new file mode 100644 index 0000000..27f8271 --- /dev/null +++ b/tests/resumefail.chk @@ -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 index 0000000..053b05f --- /dev/null +++ b/tests/resumefail.log @@ -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 index 0000000..7bce9d0 --- /dev/null +++ b/tests/savefail.chk @@ -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 index 0000000..f907d99 --- /dev/null +++ b/tests/savefail.log @@ -0,0 +1,6 @@ +## Save right after starting to invalid filename +n +seed 1240742801 +save +y +/ \ No newline at end of file -- 2.31.1