YAML coverage parser bug fixed -- handling `\n` and `\t` correctly
authorAaron Traas <aaron@traas.org>
Thu, 13 Jul 2017 19:56:37 +0000 (15:56 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 14 Jul 2017 01:52:27 +0000 (21:52 -0400)
tests/coverage_dungeon.py
tests/saveresume.4.chk
tests/saveresume.4.log

index a61c6f7ef43573f228e914ca0aa3c25c397e8c7a..50697feedb7b5fbd701f65a6e37a012e020d5046 100755 (executable)
@@ -44,6 +44,8 @@ def search(needle, haystack):
     # replacing %s, %d, etc. with regex wildcards, so the variable messages
     # within the dungeon definition will actually match
     needle = re.escape(needle) \
     # replacing %s, %d, etc. with regex wildcards, so the variable messages
     # within the dungeon definition will actually match
     needle = re.escape(needle) \
+             .replace("\\n", "\n") \
+             .replace("\\t", "\t") \
              .replace("\%S", ".*") \
              .replace("\%s", ".*") \
              .replace("\%d", ".*") \
              .replace("\%S", ".*") \
              .replace("\%s", ".*") \
              .replace("\%d", ".*") \
index 06c3b4b10b2e89e1cf7a75beb1d245fa174fc090..260cbf3b40c1a474c471147d098d9f86621fdd9e 100644 (file)
@@ -14,10 +14,6 @@ You're at sw end.
 
 The grate is locked.
 
 
 The grate is locked.
 
-> yes
-
-Guess again.
-
 > blast
 
 There is a loud explosion, and a twenty-foot hole appears in the far
 > blast
 
 There is a loud explosion, and a twenty-foot hole appears in the far
@@ -25,7 +21,7 @@ wall, burying the dwarves in the rubble.  You march through the hole
 and find yourself in the main office, where a cheering band of
 friendly elves carry the conquering adventurer off into the sunset.
 
 and find yourself in the main office, where a cheering band of
 friendly elves carry the conquering adventurer off into the sunset.
 
-You scored 423 out of a possible 430, using 469 turns.
+You scored 423 out of a possible 430, using 468 turns.
 
 Your score puts you in Master Adventurer Class A.
 
 
 Your score puts you in Master Adventurer Class A.
 
index d07d342b51118f536d6da9b48594c326ef8b6fa5..a2d5901f0ce07b12f6434c94ead6f16787f2260a 100644 (file)
@@ -4,5 +4,4 @@ n
 resume
 y
 saveresume_win.adv
 resume
 y
 saveresume_win.adv
-yes
 blast
\ No newline at end of file
 blast
\ No newline at end of file