X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tests%2FREADME;h=d84dfd4a81d3ceb33712ea2ed756377519313daf;hb=62cd0c78dab69bef371aec943fe78ff464ae4f15;hp=94fbe2d0c50581a869c049a16c649ab7dae09801;hpb=53074fb1eab1088d829a9a3f5aa02797a6fd540e;p=open-adventure.git diff --git a/tests/README b/tests/README index 94fbe2d..d84dfd4 100644 --- a/tests/README +++ b/tests/README @@ -1,16 +1,36 @@ = Notes on the test machinery = -A .tst extension means it's a game log +== Understanding and running tests == + +A .log extension means it's a game log A .chk extension means it's expected output from a test -In general, a file named foo.chk is the expected output from theb game log +The test files are run in alphabetical order. This allows you to +ensure certain tests are run in a particular order merely by giving +them appropriate names, e.g.: test.1.log, test.2.log, test.3.log. This +is useful for testing save and resume. + +In general, a file named foo.chk is the expected output from the game log foo.log. To add new tests, just drop log files in this directory. -To see summary lines from all tests, 'make testlist'. +To see summary lines from all tests, 'make testlist'. The summary lines +are those led with ##; you should have one such descriptive line at the +head of each file. + +To run the tests, "make check". + +To remake the check files, "make buildchecks". + +== Composing tests == + +The simplest way to make a test is to simply play a game with the -l +option giving a log path. Commands will be captured to that log. + +To re-use a command sequence from an existing log, run advent and +paste it to the advent command log from the clipboard. -To run the tests, "make regress". +To see where we can use more tests, "make coverage". -To remake the check files, "make buildregress". // end