More coverage improvements.

This commit is contained in:
Eric S. Raymond 2017-07-14 12:00:29 -04:00
parent 66fba512a7
commit 61570c700b
3 changed files with 23 additions and 10 deletions

View file

@ -3,8 +3,12 @@
# This is the open-adventure dungeon text coverage report generator. It # This is the open-adventure dungeon text coverage report generator. It
# consumes a YAML description of the dungeon and determines whether the # consumes a YAML description of the dungeon and determines whether the
# various strings contained are present within the test check files. # various strings contained are present within the test check files.
#
# The default HTML output is appropriate for use with Gitlab CI.
# You can override it with a command-line argument.
import os import os
import sys
import yaml import yaml
import re import re
@ -306,6 +310,9 @@ if __name__ == "__main__":
print(" actions............: {}% covered ({} of {})".format(actions_percent, actions_covered, actions_total)) print(" actions............: {}% covered ({} of {})".format(actions_percent, actions_covered, actions_total))
print(" specials...........: {}% covered ({} of {})".format(special_percent, special_covered, special_total)) print(" specials...........: {}% covered ({} of {})".format(special_percent, special_covered, special_total))
if len(sys.argv) > 1:
html_output_path = sys.argv[1]
# render HTML report # render HTML report
with open(html_output_path, "w") as f: with open(html_output_path, "w") as f:
f.write(html_template.format( f.write(html_template.format(

View file

@ -1342,6 +1342,11 @@ A glistening pearl falls out of the clam and rolls away. Goodness,
this must really be an oyster. (I never was very good at identifying this must really be an oyster. (I never was very good at identifying
bivalves.) Whatever it is, it has now snapped shut again. bivalves.) Whatever it is, it has now snapped shut again.
> open oyster
The oyster creaks open, revealing nothing but oyster inside. It
promptly snaps shut again.
> s > s
You're at complex junction. You're at complex junction.
@ -2096,6 +2101,9 @@ down a gully.
> in > in
Tsk! A wizard wouldn't have to take 350 turns. This is going to cost
you a couple of points.
You're inside building. You're inside building.
There is a golden chain lying in a heap on the floor! There is a golden chain lying in a heap on the floor!
@ -2130,9 +2138,6 @@ There are many coins here!
> drop ruby > drop ruby
Tsk! A wizard wouldn't have to take 350 turns. This is going to cost
you a couple of points.
OK OK
> drop sapphire > drop sapphire
@ -2418,14 +2423,14 @@ You're in dusty rock room.
> d > d
You're at complex junction.
> e
Your lamp is getting dim. You'd best start wrapping this up, unless Your lamp is getting dim. You'd best start wrapping this up, unless
you can find some fresh batteries. I seem to recall there's a vending you can find some fresh batteries. I seem to recall there's a vending
machine in the maze. Bring some coins with you. machine in the maze. Bring some coins with you.
You're at complex junction.
> e
You are in an anteroom leading to a large passage to the east. Small You are in an anteroom leading to a large passage to the east. Small
passages go west and up. The remnants of recent digging are evident. passages go west and up. The remnants of recent digging are evident.
A sign in midair here says "Cave under construction beyond this point. A sign in midair here says "Cave under construction beyond this point.
@ -2642,14 +2647,14 @@ You're in Plover Room.
> e > e
Your lamp has run out of power.
There is no way to go that direction. There is no way to go that direction.
You're in Plover Room. You're in Plover Room.
> e > e
Your lamp has run out of power.
There is no way to go that direction. There is no way to go that direction.
You're in Plover Room. You're in Plover Room.
@ -2991,7 +2996,7 @@ There is a loud explosion, and a twenty-foot hole appears in the far
wall, burying the snakes in the rubble. A river of molten lava pours wall, burying the snakes in the rubble. A river of molten lava pours
in through the hole, destroying everything in its path, including you! in through the hole, destroying everything in its path, including you!
You scored 399 out of a possible 430, using 476 turns. You scored 399 out of a possible 430, using 477 turns.
Your score puts you in Master Adventurer Class B. Your score puts you in Master Adventurer Class B.

View file

@ -225,6 +225,7 @@ ne
e e
n n
open clam open clam
open oyster
s s
u u
e e