From 8b8a3a73c4812af90bdd755c35f6c4e001553872 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 12 Apr 2022 19:45:43 -0400 Subject: [PATCH] Fix bugs in coverage testing. --- Makefile | 5 +++-- adventure.yaml | 1 - tests/coverage_dungeon.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c44cce5..f8599ea 100644 --- 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 diff --git a/adventure.yaml b/adventure.yaml index 7b40eaf..8190536 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -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: |- diff --git a/tests/coverage_dungeon.py b/tests/coverage_dungeon.py index 46f0b11..182930c 100755 --- a/tests/coverage_dungeon.py +++ b/tests/coverage_dungeon.py @@ -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) -- 2.31.1