Fix bugs in coverage testing.
This commit is contained in:
parent
865e10e6d0
commit
8b8a3a73c4
3 changed files with 7 additions and 7 deletions
5
Makefile
5
Makefile
|
@ -64,8 +64,9 @@ cheat: $(CHEAT_OBJS) dungeon.o
|
||||||
check: advent cheat
|
check: advent cheat
|
||||||
cd tests; $(MAKE) --quiet
|
cd tests; $(MAKE) --quiet
|
||||||
|
|
||||||
# After this, run your browser ob coverage/open-adventure/index.html
|
# After this, run your browser on coverage/open-adventure/index.html
|
||||||
# to see coverage results.
|
# to see coverage results. Browse coverage/adventure.yaml.html
|
||||||
|
# to see symbol coverage over the YAML file.
|
||||||
coverage: debug
|
coverage: debug
|
||||||
cd tests; $(MAKE) coverage --quiet
|
cd tests; $(MAKE) coverage --quiet
|
||||||
|
|
||||||
|
|
|
@ -2828,7 +2828,6 @@ arbitrary_messages: !!omap
|
||||||
black smoke.
|
black smoke.
|
||||||
- SHELL_IMPERVIOUS: 'The shell is very strong and is impervious to attack.'
|
- 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.'
|
- 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.'
|
- 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.'
|
- NASTY_DRAGON: 'The dragon looks rather nasty. You''d best not try to get by.'
|
||||||
- BIRD_BURNT: |-
|
- BIRD_BURNT: |-
|
||||||
|
|
|
@ -71,10 +71,10 @@ def search(needle, haystack):
|
||||||
needle_san = re.escape(needle) \
|
needle_san = re.escape(needle) \
|
||||||
.replace("\\n", "\n") \
|
.replace("\\n", "\n") \
|
||||||
.replace("\\t", "\t") \
|
.replace("\\t", "\t") \
|
||||||
.replace("\%S", ".*") \
|
.replace("%S", ".*") \
|
||||||
.replace("\%s", ".*") \
|
.replace("%s", ".*") \
|
||||||
.replace("\%d", ".*") \
|
.replace("%d", ".*") \
|
||||||
.replace("\%V", ".*")
|
.replace("%V", ".*")
|
||||||
|
|
||||||
return re.search(needle_san, haystack)
|
return re.search(needle_san, haystack)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue