Fixed -r option. Added test to make sure it doesn't break later.
authorAaron Traas <aaron@traas.org>
Sun, 2 Jul 2017 05:36:28 +0000 (01:36 -0400)
committerAaron Traas <aaron@traas.org>
Sun, 2 Jul 2017 05:36:28 +0000 (01:36 -0400)
main.c
tests/saveresumeopt.chk [new file with mode: 0644]
tests/saveresumeopt.log [new file with mode: 0644]

diff --git a/main.c b/main.c
index 2d207d86f8c1685f5ecaeb8a0df17660c21a5600..9d466b41f5176ff042ade81676bcdd90c0462e97 100644 (file)
--- a/main.c
+++ b/main.c
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
     /*  Options. */
 
 #ifndef ADVENT_NOSAVE
-    const char* opts = "l:or";
+    const char* opts = "l:or:";
     const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename]\n";
 #else
     const char* opts = "l:o";
diff --git a/tests/saveresumeopt.chk b/tests/saveresumeopt.chk
new file mode 100644 (file)
index 0000000..bc08d9b
--- /dev/null
@@ -0,0 +1,9 @@
+
+You're in front of building.
+
+
+You scored 27 out of a possible 430, using 2 turns.
+
+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/saveresumeopt.log b/tests/saveresumeopt.log
new file mode 100644 (file)
index 0000000..af159ff
--- /dev/null
@@ -0,0 +1,2 @@
+## Simple quit
+#options: -r saveresume.adv