empserver/tests/info-test
Markus Armbruster 4f2b8eea10 tests: Move "not expected to work" warning into test-common.sh
Warn the first time a server is started.  Incorrect for info-test with
POSIX threads, so suppress the warning there.

Improve the warning message a bit while we're at it.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2014-01-19 10:08:20 +01:00

46 lines
865 B
Bash
Executable file

#!/bin/sh -e
# Documentation completeness test for Empire
if [ $# -ne 1 ]
then echo "Usage: $0 SRCDIR" >&2; exit 1
fi
srcdir="$1"
. "$srcdir"/tests/test-common.sh
create_sandbox
# begin_test warns POSIX isn't expected to work, because thread
# scheduling isn't reliably deterministic. Not an issue for this
# test, so suppress the warning.
[ "$empthread" = POSIX ] && warn_empthread=
begin_test <<EOF
add 1 1 1 p
des 0:2,0 -
newcap 1 0,0
add 2 visitor visitor v
nat
nat 1
nat 2
EOF
feed_input POGO peter <<EOF
list >sandbox/deity.list
EOF
feed_input 1 1 <<EOF
list >sandbox/sanctuary.list
break
list >sandbox/active.list
EOF
feed_input visitor visitor <<EOF
list >sandbox/visitor.list
EOF
end_test
if perl $srcdir/tests/info/cmp-toc-vs-lists.pl info/toc sandbox/*.list
then echo "Command documentation OK"
else echo "Command documentation FAIL"; false
fi