From 9e1143e780e2526366f439fc7089097bb4bf8d1d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 18 Jun 2017 07:41:40 -0400 Subject: [PATCH] Improve test coverage. --- tests/defeat.chk | 2 +- tests/defeat.log | 2 +- tests/illformed.chk | 22 +++++++++++++++------- tests/illformed.log | 5 ++++- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/tests/defeat.chk b/tests/defeat.chk index 1185fd0..04723da 100644 --- a/tests/defeat.chk +++ b/tests/defeat.chk @@ -2028,7 +2028,7 @@ A brilliant blue star sapphire is here! OK -> fly rug +> fly The rug ferries you back across the chasm. diff --git a/tests/defeat.log b/tests/defeat.log index 2c5a685..0b89954 100644 --- a/tests/defeat.log +++ b/tests/defeat.log @@ -341,7 +341,7 @@ drop rug drop emerald fly rug take sapphire -fly rug +fly take emerald drop ruby take rug diff --git a/tests/illformed.chk b/tests/illformed.chk index 3cf7518..aa4e77a 100644 --- a/tests/illformed.chk +++ b/tests/illformed.chk @@ -127,6 +127,14 @@ Carry what? Blasting requires dynamite. +> take bottle + +OK + +> drink water + +The bottle of water is now empty. + > throw axe I see no axe here. @@ -163,6 +171,10 @@ I see no urn here. Don't be ridiculous! +> discard keys + +You aren't carrying it! + > drink keys Don't be ridiculous! @@ -238,8 +250,6 @@ There are some keys on the ground here. There is a shiny brass lamp nearby. -There is a bottle of water here. - > on Your lamp is now on. @@ -300,8 +310,6 @@ There are some keys on the ground here. There is a lamp shining nearby. -There is a bottle of water here. - > fuck Watch it! @@ -320,9 +328,9 @@ Okay, "BOO". > score -You have garnered 27 out of a possible 430 points, using 61 turns. +You have garnered 27 out of a possible 430 points, using 64 turns. -> quit bottle +> quit keys Huh? @@ -334,7 +342,7 @@ Do you really want to quit now? OK -You scored 27 out of a possible 430, using 63 turns. +You scored 27 out of a possible 430, using 66 turns. You are obviously a rank amateur. Better luck next time. diff --git a/tests/illformed.log b/tests/illformed.log index dae0e25..102ecda 100644 --- a/tests/illformed.log +++ b/tests/illformed.log @@ -22,6 +22,8 @@ find foo find bar carry blast +take bottle +drink water throw axe throw knife lock @@ -31,6 +33,7 @@ attack unlock chain fill urn eat keys +discard keys drink keys off keys break keys @@ -64,6 +67,6 @@ walk fly say boo score -quit bottle +quit keys quit yes -- 2.31.1