]> git.pond.sub.org Git - empserver/blob - tests/info-test
tests/info: New; checks info and code agree on commands
[empserver] / tests / info-test
1 #!/bin/sh -e
2 # Documentation completeness test for Empire
3
4 if [ $# -ne 1 ]
5 then echo "Usage: $0 SRCDIR" >&2; exit 1
6 fi
7
8 srcdir="$1"
9
10 . "$srcdir"/tests/test-common.sh
11
12 create_sandbox
13
14 begin_test <<EOF
15 add 1 1 1 p
16 des 0:2,0 -
17 newcap 1 0,0
18 add 2 visitor visitor v
19 nat
20 nat 1
21 nat 2
22 EOF
23
24 feed_input POGO peter <<EOF
25 list >sandbox/deity.list
26 EOF
27 feed_input 1 1 <<EOF
28 list >sandbox/sanctuary.list
29 break
30 list >sandbox/active.list
31 EOF
32 feed_input visitor visitor <<EOF
33 list >sandbox/visitor.list
34 EOF
35
36 end_test
37
38 if perl $srcdir/tests/info/cmp-toc-vs-lists.pl info/toc sandbox/*.list
39 then echo "Command documentation OK"
40 else echo "Command documentation FAIL"; false
41 fi