YAML coverage parser bug fixed -- handling `\n` and `\t` correctly
[open-adventure.git] / tests / coverage_dungeon.py
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) \
+             .replace("\\n", "\n") \
+             .replace("\\t", "\t") \
              .replace("\%S", ".*") \
              .replace("\%s", ".*") \
              .replace("\%d", ".*") \