From dcf4d5f1d3f3e232f6126fbf94f83ccdd53c5b04 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 13 Jun 2017 17:32:07 -0400 Subject: [PATCH] Correct a typo, and a test for the affected verb. --- actions.c | 4 ++-- tests/urntest.log | 2 +- tests/woodshint.chk | 8 +++++++- tests/woodshint.log | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/actions.c b/actions.c index 42541bf..aa6e6da 100644 --- a/actions.c +++ b/actions.c @@ -1053,12 +1053,12 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj) if (verb == SAY)obj=WD2; if (obj == 0) { /* Analyse an intransitive verb (ie, no object given yet). */ - switch (verb-1) { + switch (verb-1) { case 0: /* CARRY */ return carry(verb, INTRANSITIVE); case 1: /* DROP */ return(8000); case 2: /* SAY */ return(8000); case 3: /* UNLOC */ return lock(verb, INTRANSITIVE); - case 4: /* NOTHI */ {RSPEAK(54); return(20012);} + case 4: /* NOTHI */ {RSPEAK(54); return(GO_CLEAROBJ);} case 5: /* LOCK */ return lock(verb, INTRANSITIVE); case 6: /* LIGHT */ return light(verb, INTRANSITIVE); case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE); diff --git a/tests/urntest.log b/tests/urntest.log index f394188..e0d4682 100644 --- a/tests/urntest.log +++ b/tests/urntest.log @@ -1,4 +1,4 @@ -# Test verbs on urn +## Test verbs on urn n seed 1838473132 in diff --git a/tests/woodshint.chk b/tests/woodshint.chk index b211862..d90bfb5 100644 --- a/tests/woodshint.chk +++ b/tests/woodshint.chk @@ -129,6 +129,10 @@ Drop what? Okay, "SAY". +> nothing + +OK + > wave Wave what? @@ -169,9 +173,11 @@ Wake what? You are wandering aimlessly through the forest. +Would you like to be shown out of the forest? + > e -You are wandering aimlessly through the forest. +Please answer the question. Would you like to be shown out of the forest? diff --git a/tests/woodshint.log b/tests/woodshint.log index 11b1d13..7efaa33 100644 --- a/tests/woodshint.log +++ b/tests/woodshint.log @@ -28,6 +28,7 @@ e e drop say +nothing wave calm walk -- 2.31.1