Fix bugs in coverage testing.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 12 Apr 2022 23:45:43 +0000 (19:45 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 12 Apr 2022 23:45:43 +0000 (19:45 -0400)
Makefile
adventure.yaml
tests/coverage_dungeon.py

index c44cce5a8591c0a081e021e876b8e75a89160052..f8599ea4f0ca42e5b3a9f826f6c0d6b631cd4d6e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,9 @@ cheat: $(CHEAT_OBJS) dungeon.o
 check: advent cheat
        cd tests; $(MAKE) --quiet
 
-# After this, run your browser ob coverage/open-adventure/index.html
-# to see coverage results.
+# After this, run your browser on coverage/open-adventure/index.html
+# to see coverage results. Browse coverage/adventure.yaml.html
+# to see symbol coverage over the YAML file.
 coverage: debug
        cd tests; $(MAKE) coverage --quiet
 
index 7b40eaf26ff8dbf08339082f68584d74f4b165af..81905366ba048eb12171980ddb7ba62b9f19ed73 100644 (file)
@@ -2828,7 +2828,6 @@ arbitrary_messages:  !!omap
       black smoke.
 - SHELL_IMPERVIOUS: 'The shell is very strong and is impervious to attack.'
 - START_OVER: 'What''s the matter, can''t you read?  Now you''d best start over.'
-- WELL_POINTLESS: 'Well, that was remarkably pointless.'
 - DRAGON_SCALES: 'The axe bounces harmlessly off the dragon''s thick scales.'
 - NASTY_DRAGON: 'The dragon looks rather nasty.  You''d best not try to get by.'
 - BIRD_BURNT: |-
index 46f0b11de4d6803a3752daba22e3d83f7731165c..182930cb878511ea881a3473fb28ff71e119f80e 100755 (executable)
@@ -71,10 +71,10 @@ def search(needle, haystack):
     needle_san = re.escape(needle) \
              .replace("\\n", "\n") \
              .replace("\\t", "\t") \
-             .replace("\%S", ".*") \
-             .replace("\%s", ".*") \
-             .replace("\%d", ".*") \
-             .replace("\%V", ".*")
+             .replace("%S", ".*") \
+             .replace("%s", ".*") \
+             .replace("%d", ".*") \
+             .replace("%V", ".*")
 
     return re.search(needle_san, haystack)