Improve test coverage.

This commit is contained in:
Eric S. Raymond 2017-06-16 15:40:46 -04:00
parent 0d373a6b87
commit 851f90cdf7
5 changed files with 19 additions and 9 deletions

View file

@ -644,12 +644,12 @@ int light(token_t verb, token_t obj)
}
if (obj == URN) {
spk=URN_EMPTY;
if (game.prop[URN] == 0)
{RSPEAK(spk); return GO_CLEAROBJ;}
spk=URN_LIT;
game.prop[URN]=2;
RSPEAK(spk);
if (game.prop[URN] == 0) {
RSPEAK(URN_EMPTY);
} else {
game.prop[URN] = 2;
RSPEAK(URN_LIT);
}
return GO_CLEAROBJ;
} else {
if (obj != LAMP)