Documentation improvements.
This commit is contained in:
parent
1a12a3acf2
commit
e07cedf332
4 changed files with 39 additions and 6 deletions
|
@ -21,6 +21,10 @@ care has been taken to not silently change gameplay. By policy, all
|
||||||
user-visible changes from 2.5 are revertible with the -o (oldstyle)
|
user-visible changes from 2.5 are revertible with the -o (oldstyle)
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
If you encounter a bug (not likely; thuis code is old and well tested)
|
||||||
|
please try to make a test log that reproduces it, using the -l option,
|
||||||
|
and ship it to the maintainers.
|
||||||
|
|
||||||
// end
|
// end
|
||||||
|
|
||||||
|
|
||||||
|
|
31
tests/README
31
tests/README
|
@ -1,20 +1,43 @@
|
||||||
= Notes on the test machinery =
|
= 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
|
A .chk extension means it's expected output from a test
|
||||||
|
|
||||||
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.
|
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 theb game log
|
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.
|
foo.log. To add new tests, just drop log files in this directory.
|
||||||
|
|
||||||
To see summary lines from all tests, 'make testlist'. The summary lines
|
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
|
are those led with ##; you should have one such descriptive line at the
|
||||||
head of the file.
|
head of each file.
|
||||||
|
|
||||||
To run the tests, "make regress".
|
To run the tests, "make regress".
|
||||||
|
|
||||||
To remake the check files, "make buildregress".
|
To remake the check files, "make buildregress".
|
||||||
|
|
||||||
|
== 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 -s and
|
||||||
|
paste it to the advent command log from the clipboard. If you don't
|
||||||
|
use -s to disable advanced ediiting, the code used for that will consume
|
||||||
|
the first line of the paste and discare the rest. This is almost
|
||||||
|
certainly not what you want.
|
||||||
|
|
||||||
|
To see where we can use more tests, have a look at our test coverage
|
||||||
|
report:
|
||||||
|
|
||||||
|
http://esr.gitlab.io/open-adventure/coverage/
|
||||||
|
|
||||||
|
Improvements in test coverage are always welcome.
|
||||||
|
|
||||||
// end
|
// end
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,11 @@ minerals, but is not unpleasant. It is extremely cold.
|
||||||
I can only tell you what you see as you move about and manipulate
|
I can only tell you what you see as you move about and manipulate
|
||||||
things. I cannot tell you where remote things are.
|
things. I cannot tell you where remote things are.
|
||||||
|
|
||||||
|
> inven keys
|
||||||
|
|
||||||
|
I can only tell you what you see as you move about and manipulate
|
||||||
|
things. I cannot tell you where remote things are.
|
||||||
|
|
||||||
> in
|
> in
|
||||||
|
|
||||||
You are inside a building, a well house for a large spring.
|
You are inside a building, a well house for a large spring.
|
||||||
|
@ -238,7 +243,7 @@ Okay, "BOO".
|
||||||
|
|
||||||
> score
|
> score
|
||||||
|
|
||||||
You have garnered 32 out of a possible 430 points, using 46 turns.
|
You have garnered 32 out of a possible 430 points, using 47 turns.
|
||||||
|
|
||||||
> quit
|
> quit
|
||||||
|
|
||||||
|
@ -248,7 +253,7 @@ Do you really want to quit now?
|
||||||
|
|
||||||
OK
|
OK
|
||||||
|
|
||||||
You scored 32 out of a possible 430, using 47 turns.
|
You scored 32 out of a possible 430, using 48 turns.
|
||||||
|
|
||||||
You are obviously a rank amateur. Better luck next time.
|
You are obviously a rank amateur. Better luck next time.
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ forward
|
||||||
eat
|
eat
|
||||||
drink
|
drink
|
||||||
find keys
|
find keys
|
||||||
|
inven keys
|
||||||
in
|
in
|
||||||
listen
|
listen
|
||||||
keys
|
keys
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue