tests/empdump: New; exercising the empdump utility

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-01-29 20:24:26 +01:00
parent c594b6120e
commit 5a1544f925
81 changed files with 561 additions and 0 deletions

View file

@ -273,6 +273,7 @@ else
@echo "$(srcdir)/tests/bridgefall-test SKIPPED"
@echo "$(srcdir)/tests/retreat-test SKIPPED"
endif
$(srcdir)/tests/empdump-test $(srcdir)
### Implicit rules

33
tests/empdump-test Executable file
View file

@ -0,0 +1,33 @@
#!/bin/sh -e
# Basic empdump test
if [ $# -ne 1 ]
then echo "Usage: $0 SRCDIR" >&2; exit 1
fi
srcdir="$1"
. "$srcdir"/tests/test-common.sh
create_sandbox
$files -f >/dev/null
for i in `git ls-files "$testdir"/xundump-errors | uniq`
do run errors $empdump -ni "$i"
done
run errors $empdump -i "$testdir"/verify-prep
run errors $empdump -ni "$testdir"/verify-fails
run errors $empdump -ni "$testdir"/verify-fixed
$files -f >/dev/null
run import1 $empdump -i "$srcdir"/tests/smoke/final.xdump
run export1 $empdump -xm
mv sandbox/export1.out sandbox/intermediate.xdump
mv $data $data-intermediate
$files -f >/dev/null
run import2 $empdump -i sandbox/intermediate.xdump
run export2 $empdump -x
mv sandbox/export2.out sandbox/final.xdump
cmp_run errors import1 export1 import2 export2
EMPIRE_CHECK_ACCEPT= cmp_out1 final.xdump "$srcdir"/tests/smoke/final.xdump

99
tests/empdump/errors.err Normal file
View file

@ -0,0 +1,99 @@
tests/empdump/xundump-errors/colhdr-amb:2: Header m of field 3 is ambiguous
tests/empdump/xundump-errors/colhdr-dup:2: Duplicate header name in field 2
tests/empdump/xundump-errors/colhdr-dup2:6: Duplicate header name in field 3
tests/empdump/xundump-errors/colhdr-dup3:2: Duplicate header pkg(0) in field 8
tests/empdump/xundump-errors/colhdr-ellipsis:2: Header field uid required in each table part
tests/empdump/xundump-errors/colhdr-ellipsis2:2: Junk after ...
tests/empdump/xundump-errors/colhdr-ellipsis3:2: Table infrastructure doesn't support ...
tests/empdump/xundump-errors/colhdr-ellipsis4:2: Header field uid required in each table part
tests/empdump/xundump-errors/colhdr-ellipsis5:2: Table sect doesn't support ...
tests/empdump/xundump-errors/colhdr-eof:2: Unexpected EOF
tests/empdump/xundump-errors/colhdr-first:2: Header field uid must come first
tests/empdump/xundump-errors/colhdr-idxbig:2: Header pkg(99) index out of bounds in field 7
tests/empdump/xundump-errors/colhdr-idxneg:2: Index must not be negative in header field 7
tests/empdump/xundump-errors/colhdr-idxreq:2: Header pkg requires an index in field 7
tests/empdump/xundump-errors/colhdr-junk:2: Junk in header field 1
tests/empdump/xundump-errors/colhdr-junk2:2: Junk in header field 1
tests/empdump/xundump-errors/colhdr-junk3:2: Junk in header field 1
tests/empdump/xundump-errors/colhdr-malidx:2: Malformed number in index of header field 1
tests/empdump/xundump-errors/colhdr-malidx2:2: Malformed index in header field 1
tests/empdump/xundump-errors/colhdr-malidx3:2: Malformed index in header field 1
tests/empdump/xundump-errors/colhdr-miss:2: Header field uid missing
tests/empdump/xundump-errors/colhdr-miss:2: Header field ctype(2) missing
tests/empdump/xundump-errors/colhdr-miss:2: Header fields camt(0) ... camt(2) missing
tests/empdump/xundump-errors/colhdr-miss:2: Header field nllag missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field uid required in each table part
tests/empdump/xundump-errors/colhdr-miss2:21: Header fields ctype(0) ... ctype(2) missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header fields camt(0) ... camt(2) missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field type missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field level missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field cost missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field nrndx missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field nrdep missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field nlndx missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field nlmin missing
tests/empdump/xundump-errors/colhdr-miss2:21: Header field nllag missing
tests/empdump/xundump-errors/colhdr-noidx:2: Header name doesn't take an index in field 1
tests/empdump/xundump-errors/colhdr-sep:2: Bad field separator after field 1
tests/empdump/xundump-errors/colhdr-symidx:2: Symbolic index in header field 1 not yet implemented
tests/empdump/xundump-errors/colhdr-unexp2:2: Expected header pkg(0) in field 7
tests/empdump/xundump-errors/colhdr-unk:2: Header xxx of field 1 is unknown
tests/empdump/xundump-errors/fld-ambsym:2: Ambiguous flags symbol `s' in field 29
tests/empdump/xundump-errors/fld-badnum:3: Field 2 can't hold this value
tests/empdump/xundump-errors/fld-constnum:3: Value for field 1 must be 0
tests/empdump/xundump-errors/fld-conststr:3: Value for field 1 must be "road network"
tests/empdump/xundump-errors/fld-conststr2:8: Value for field 2 must be nil
tests/empdump/xundump-errors/fld-eof:2: Unexpected EOF
tests/empdump/xundump-errors/fld-invesc:2: Invalid escape sequence in field 1
tests/empdump/xundump-errors/fld-invid:3: Field 1 can't hold this value
tests/empdump/xundump-errors/fld-invid1:3: Expected 0 in field 1
tests/empdump/xundump-errors/fld-invid2:3: Field 1 must be > -1
tests/empdump/xundump-errors/fld-invid3:4: Field 1 must be > 2
tests/empdump/xundump-errors/fld-invid4:3: Field 1 must be <= 98
tests/empdump/xundump-errors/fld-junk:2: Junk in field 1
tests/empdump/xundump-errors/fld-junk2:2: Junk in field 19
tests/empdump/xundump-errors/fld-malnum:2: Malformed number in field 1
tests/empdump/xundump-errors/fld-malstr:2: Malformed string in field 1
tests/empdump/xundump-errors/fld-many:2: Too many fields, expected only 6
tests/empdump/xundump-errors/fld-miss:2: Field name missing
tests/empdump/xundump-errors/fld-miss2:2: Field ctype(0) missing
tests/empdump/xundump-errors/fld-nonil:3: Field 19 doesn't take nil
tests/empdump/xundump-errors/fld-nonum:3: Field 2 doesn't take numbers
tests/empdump/xundump-errors/fld-nostr:3: Field 1 doesn't take strings
tests/empdump/xundump-errors/fld-nosym:2: Field 1 doesn't take symbols
tests/empdump/xundump-errors/fld-nosymset:2: Field 1 doesn't take symbol sets
tests/empdump/xundump-errors/fld-sep:2: Bad field separator after field 1
tests/empdump/xundump-errors/fld-strbig:3: Field 19 takes at most 9 characters
tests/empdump/xundump-errors/fld-unexpid:6: Table's first part doesn't have this row
tests/empdump/xundump-errors/fld-unexpid1:7: Expected 2 in field 1, like in table's first part
tests/empdump/xundump-errors/fld-unksym:2: Unknown level symbol `xxx' in field 11
tests/empdump/xundump-errors/fld-unparen:2: Unmatched '(' in field 19
tests/empdump/xundump-errors/ftr-fewrows:2: Expected 1024 more rows
tests/empdump/xundump-errors/ftr-fewrows2:4: Expected 13 more rows
tests/empdump/xundump-errors/ftr-fewrows3:4: Expected 1 more rows
tests/empdump/xundump-errors/ftr-fewrows4:7: Expected row with 2 in field 1, like in table's first part
tests/empdump/xundump-errors/ftr-junk:2: Junk after table footer
tests/empdump/xundump-errors/ftr-mal:2: Malformed table footer
tests/empdump/xundump-errors/ftr-mal2:6: Malformed table footer
tests/empdump/xundump-errors/ftr-manyrows:5: Too many rows
tests/empdump/xundump-errors/ftr-mismatch:2: Read 0 rows, which doesn't match footer 2 rows
tests/empdump/xundump-errors/hdr-extra:2: Extraneous header timestamp in field 1
tests/empdump/xundump-errors/hdr-extra2:2: Extraneous header uid in field 1
tests/empdump/xundump-errors/hdr-junk:1: Junk after xdump header
tests/empdump/xundump-errors/hdr-none:1: Expected xdump header
tests/empdump/xundump-errors/hdr-noperm:1: Table `map' is not permitted here
tests/empdump/xundump-errors/hdr-noperm2:1: Table `table' is not permitted here
tests/empdump/xundump-errors/hdr-unexp:4: Expected table `ship', not `plane'
tests/empdump/xundump-errors/hdr-unktab:1: Unknown table `xxx'
File plane uid 0 field flags: bit 8 is not in symbol table plane-flags
File plane uid 1 field mission: value 99 is not in symbol table missions
File plane uid 2 field owner: value 255 indexes table nat out of bounds 0..99
File plane uid 2 field ship: value 42 indexes table ship out of bounds 0..0
File plane uid 3 field ship: value 0 indexes table ship out of bounds 0..0
File land uid 0 field ship: value 0 indexes table ship out of bounds 0..0
File plane uid 3: on two carriers
File land uid 0: on two carriers
File plane uid 0: stuck in the air (fixed)
File plane uid 1: ghost stuck on carrier (fixed)
File land uid 0: ghost stuck on carrier (fixed)
File nuke uid 0: ghost stuck on carrier (fixed)

View file

@ -0,0 +1,77 @@
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0

View file

@ -0,0 +1,19 @@
# Test every non-recoverable verify_fail(), as far as possible
# Not possible: header corrupt, incorrect uid
config plane
uid owner xloc yloc type effic mobil off tech opx opy mission radius wing range ship land harden flags access theta
# bit not in symbol table plane-flags
0 1 0 0 0 100 0 0 0 0 0 0 0 "" 0 -1 -1 0 256 0 0.00000
# value not in symbol table missions
1 1 0 0 0 100 0 0 0 0 0 99 0 "" 0 -1 -1 0 0 0 0.00000
# value indexes table nat out of bounds
# value refers to missing element of table ship
2 255 0 0 0 100 0 0 0 0 0 0 0 "" 0 42 -1 0 0 0 0.00000
# on two carriers
3 1 0 0 0 100 0 0 0 0 0 0 0 "" 0 0 0 0 0 0 0.00000
/config
config land
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access
# on two carriers
0 1 0 0 0 100 0 0 0 0 0 none 0 "" 0 0 42 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0
/config

View file

@ -0,0 +1,19 @@
# Test every recoverable verify_fail(), as far as possible
# Not possible: bogus sect coordinates
config plane
uid owner xloc yloc type effic mobil off tech opx opy mission radius wing range ship land harden flags access theta
# stuck in the air
0 1 0 0 0 100 0 0 100 0 0 none 0 "" 0 -1 -1 0 (launched) 0 0.00000
# ghost stuck on carrier
1 0 0 0 0 100 0 0 100 0 0 none 0 "" 0 0 -1 0 () 0 0.00000
/config
config land
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access
# ghost stuck on carrier
0 0 0 0 0 100 0 0 100 0 0 none 0 "" 0 0 42 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
/config
config nuke
uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane
# ghost stuck on carrier
0 0 0 0 0 100 0 0 300 0 0 none 0 "" 0
/config

View file

@ -0,0 +1,5 @@
config nat
cnum stat cname passwd ip hostname userid xcap ycap xorg yorg update tgms ann timeused btu access milreserve money login logout newstim annotim tech research education happiness relations(0) relations(1) relations(2) relations(3) relations(4) relations(5) relations(6) relations(7) relations(8) relations(9) relations(10) relations(11) relations(12) relations(13) relations(14) relations(15) relations(16) relations(17) relations(18) relations(19) relations(20) relations(21) relations(22) relations(23) relations(24) relations(25) relations(26) relations(27) relations(28) relations(29) relations(30) relations(31) relations(32) relations(33) relations(34) relations(35) relations(36) relations(37) relations(38) relations(39) relations(40) relations(41) relations(42) relations(43) relations(44) relations(45) relations(46) relations(47) relations(48) relations(49) relations(50) relations(51) relations(52) relations(53) relations(54) relations(55) relations(56) relations(57) relations(58) relations(59) relations(60) relations(61) relations(62) relations(63) relations(64) relations(65) relations(66) relations(67) relations(68) relations(69) relations(70) relations(71) relations(72) relations(73) relations(74) relations(75) relations(76) relations(77) relations(78) relations(79) relations(80) relations(81) relations(82) relations(83) relations(84) relations(85) relations(86) relations(87) relations(88) relations(89) relations(90) relations(91) relations(92) relations(93) relations(94) relations(95) relations(96) relations(97) relations(98) contacts(0) contacts(1) contacts(2) contacts(3) contacts(4) contacts(5) contacts(6) contacts(7) contacts(8) contacts(9) contacts(10) contacts(11) contacts(12) contacts(13) contacts(14) contacts(15) contacts(16) contacts(17) contacts(18) contacts(19) contacts(20) contacts(21) contacts(22) contacts(23) contacts(24) contacts(25) contacts(26) contacts(27) contacts(28) contacts(29) contacts(30) contacts(31) contacts(32) contacts(33) contacts(34) contacts(35) contacts(36) contacts(37) contacts(38) contacts(39) contacts(40) contacts(41) contacts(42) contacts(43) contacts(44) contacts(45) contacts(46) contacts(47) contacts(48) contacts(49) contacts(50) contacts(51) contacts(52) contacts(53) contacts(54) contacts(55) contacts(56) contacts(57) contacts(58) contacts(59) contacts(60) contacts(61) contacts(62) contacts(63) contacts(64) contacts(65) contacts(66) contacts(67) contacts(68) contacts(69) contacts(70) contacts(71) contacts(72) contacts(73) contacts(74) contacts(75) contacts(76) contacts(77) contacts(78) contacts(79) contacts(80) contacts(81) contacts(82) contacts(83) contacts(84) contacts(85) contacts(86) contacts(87) contacts(88) contacts(89) contacts(90) contacts(91) contacts(92) contacts(93) contacts(94) contacts(95) contacts(96) contacts(97) contacts(98) rejects(0) rejects(1) rejects(2) rejects(3) rejects(4) rejects(5) rejects(6) rejects(7) rejects(8) rejects(9) rejects(10) rejects(11) rejects(12) rejects(13) rejects(14) rejects(15) rejects(16) rejects(17) rejects(18) rejects(19) rejects(20) rejects(21) rejects(22) rejects(23) rejects(24) rejects(25) rejects(26) rejects(27) rejects(28) rejects(29) rejects(30) rejects(31) rejects(32) rejects(33) rejects(34) rejects(35) rejects(36) rejects(37) rejects(38) rejects(39) rejects(40) rejects(41) rejects(42) rejects(43) rejects(44) rejects(45) rejects(46) rejects(47) rejects(48) rejects(49) rejects(50) rejects(51) rejects(52) rejects(53) rejects(54) rejects(55) rejects(56) rejects(57) rejects(58) rejects(59) rejects(60) rejects(61) rejects(62) rejects(63) rejects(64) rejects(65) rejects(66) rejects(67) rejects(68) rejects(69) rejects(70) rejects(71) rejects(72) rejects(73) rejects(74) rejects(75) rejects(76) rejects(77) rejects(78) rejects(79) rejects(80) rejects(81) rejects(82) rejects(83) rejects(84) rejects(85) rejects(86) rejects(87) rejects(88) rejects(89) rejects(90) rejects(91) rejects(92) rejects(93) rejects(94) rejects(95) rejects(96) rejects(97) rejects(98) flags
0 deity "POGO" "peter" "" "" "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00000 0.00000 0.00000 0.00000 at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () ()
1 active "1" "1" "" "" "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00000 0.00000 0.00000 0.00000 at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war at-war 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () () ()
/config

View file

@ -0,0 +1,4 @@
config sect-chr
uid name m
# Header m of field 3 is ambiguous
/config

View file

@ -0,0 +1,3 @@
config ship-chr
name name
# Duplicate header name in field 2

View file

@ -0,0 +1,8 @@
config ship-chr
type name ...
/config
config ship-chr
type name name
# Duplicate header name in field 3
/config

View file

@ -0,0 +1,4 @@
config item
uid name mnem value sell lbs pkg(0) pkg(0)
# Duplicate header pkg(0) in field 8
/config

View file

@ -0,0 +1,3 @@
config product
...
# Header field uid required in each table part

View file

@ -0,0 +1,3 @@
config item
uid ... name
# Junk after ...

View file

@ -0,0 +1,3 @@
config infrastructure
name ...
# Table infrastructure doesn't support ...

View file

@ -0,0 +1,3 @@
config product
sname name ...
# Header field uid required in each table part

View file

@ -0,0 +1,4 @@
config sect
xloc yloc ...
# Table sect doesn't support ...
/config

View file

@ -0,0 +1 @@
config ship-chr # Unexpected EOF

View file

@ -0,0 +1,4 @@
config ship
owner uid ...
# Header field uid must come first
/config

View file

@ -0,0 +1,3 @@
config item
uid name mnem value sell lbs pkg(99)
# Header pkg(99) index out of bounds in field 7

View file

@ -0,0 +1,3 @@
config item
uid name mnem value sell lbs pkg(-1)
# Index must not be negative in header field 7

View file

@ -0,0 +1,3 @@
config item
uid name mnem value sell lbs pkg
# Header pkg requires an index in field 7

View file

@ -0,0 +1,3 @@
config item
0
# Junk in header field 1

View file

@ -0,0 +1,3 @@
config item
/config
# Junk in header field 1

View file

@ -0,0 +1,3 @@
config item
.a
# Junk in header field 1

View file

@ -0,0 +1,3 @@
config item
x(-
# Malformed number in index of header field 1

View file

@ -0,0 +1,3 @@
config item
x(!
# Malformed index in header field 1

View file

@ -0,0 +1,3 @@
config item
x(0 y
# Malformed index in header field 1

View file

@ -0,0 +1,7 @@
config product
name sname ctype(0) ctype(1) type level cost nrndx nrdep nlndx nlmin
# Header field uid missing
# Header field ctype(2) missing
# Header fields camt(0) ... camt(2) missing
# Header field nllag missing
/config

View file

@ -0,0 +1,32 @@
config product
uid sname ...
0 "iron"
1 "dust"
2 "food"
3 "oil"
4 "rad"
5 "shells"
6 "guns"
7 "petrol"
8 "bars"
9 "lcm"
10 "hcm"
11 "tech"
12 "medical"
13 "edu"
14 "happy"
/config
config product
name
# Header field uid required in each table part
# Header fields ctype(0) ... ctype(2) missing
# Header fields camt(0) ... camt(2) missing
# Header field type missing
# Header field level missing
# Header field cost missing
# Header field nrndx missing
# Header field nrdep missing
# Header field nlndx missing
# Header field nlmin missing
# Header field nllag missing

View file

@ -0,0 +1,3 @@
config ship-chr
name(0)
# Header name doesn't take an index in field 1

View file

@ -0,0 +1,3 @@
config item
u=
# Bad field separator after field 1

View file

@ -0,0 +1,3 @@
config item
f(x)
# Symbolic index in header field 1 not yet implemented

View file

@ -0,0 +1,4 @@
config item
uid name mnem value sell lbs pkg(1)
# Expected header pkg(0) in field 7
/config

View file

@ -0,0 +1,4 @@
config ship-chr
xxx
# Header xxx of field 1 is unknown
/config

View file

@ -0,0 +1,3 @@
XDUMP ship-chr 1
0 "ft\040\040\040fishing\040trawler" 300 10 0 0 0 0 0 0 900 0 0 0 15 0 25 15 10 25 15 2 0 0 0 0 35 300 (sw s) 0 0
# Ambiguous flags symbol `s' in field 29

View file

@ -0,0 +1,4 @@
config land
uid owner ...
0 1.1
# Field 2 can't hold this value

View file

@ -0,0 +1,4 @@
config realm
cnum realm xl xh yl yh
1 0 0 0 0 0
# Value for field 1 must be 0

View file

@ -0,0 +1,4 @@
config infrastructure
name lcms hcms dcost mcost enable
"lala" 1 1 1 1 1
# Value for field 1 must be "road network"

View file

@ -0,0 +1,9 @@
config ship-chr
type name ...
0 nil
/config
config ship-chr
type name ...
0 "non-nil"
# Value for field 2 must be nil

View file

@ -0,0 +1,2 @@
XDUMP ship-chr 0
0 # Unexpected EOF

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
"lala\0"
# Invalid escape sequence in field 1

View file

@ -0,0 +1,4 @@
config ship
uid ...
0.1
# Field 1 can't hold this value

View file

@ -0,0 +1,4 @@
config item
uid ...
1
# Expected 0 in field 1

View file

@ -0,0 +1,4 @@
config ship
uid ...
-1
# Field 1 must be > -1

View file

@ -0,0 +1,5 @@
config ship
uid ...
2
0
# Field 1 must be > 2

View file

@ -0,0 +1,4 @@
config nat
cnum ...
100
# Field 1 must be <= 98

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
!
# Junk in field 1

View file

@ -0,0 +1,3 @@
XDUMP plane 0
0 1 0 0 0 0 0 0 0 0 0 0 0 "" 0 -1 -1 0 (!
# Junk in field 19

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
+
# Malformed number in field 1

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
"lala
# Malformed string in field 1

View file

@ -0,0 +1,3 @@
XDUMP realm 0
0 0 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f
# Too many fields, expected only 6

View file

@ -0,0 +1,3 @@
XDUMP item 0
0
# Field name missing

View file

@ -0,0 +1,3 @@
XDUMP product 0
0 "iron\040ore" "iron"
# Field ctype(0) missing

View file

@ -0,0 +1,4 @@
config land
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath ...
0 1 0 0 0 100 0 0 100 0 0 0 0 "" -1 0 42 0 nil
# Field 19 doesn't take nil

View file

@ -0,0 +1,4 @@
config item
uid name ...
0 0
# Field 2 doesn't take numbers

View file

@ -0,0 +1,4 @@
config item
uid ...
""
# Field 1 doesn't take strings

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
xxx
# Field 1 doesn't take symbols

View file

@ -0,0 +1,3 @@
XDUMP infrastructure 0
()
# Field 1 doesn't take symbol sets

View file

@ -0,0 +1,3 @@
XDUMP ship-chr 0
0!
# Bad field separator after field 1

View file

@ -0,0 +1,4 @@
config land
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath ...
0 1 0 0 0 100 0 0 100 0 0 0 0 "" -1 0 42 0 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Field 19 takes at most 9 characters

View file

@ -0,0 +1,8 @@
config ship
uid ...
/config
config ship
uid ...
2
# Table's first part doesn't have this row
/config

View file

@ -0,0 +1,9 @@
config ship
uid ...
2
/config
config ship
uid ...
1
# Expected 2 in field 1, like in table's first part
/config

View file

@ -0,0 +1,3 @@
XDUMP product 1
0 "iron ore" "iron" 0 0 0 0 0 0 0 xxx
# Unknown level symbol `xxx' in field 11

View file

@ -0,0 +1,3 @@
XDUMP plane 0
0 1 0 0 0 0 0 0 0 0 0 0 0 "" 0 -1 -1 0 (launched sync
# Unmatched '(' in field 19

View file

@ -0,0 +1,3 @@
XDUMP sect 0
/0
# Expected 1024 more rows

View file

@ -0,0 +1,5 @@
config item
uid ...
0
/config
# Expected 13 more rows

View file

@ -0,0 +1,5 @@
XDUMP infrastructure 1133466732
"road\040network" 2 2 2 1 1
"rail\040network" 1 1 1 1 1
/2
# Expected 1 more rows

View file

@ -0,0 +1,8 @@
config ship
uid ...
2
/config
config ship
uid ...
/config
# Expected row with 2 in field 1, like in table's first part

View file

@ -0,0 +1,3 @@
XDUMP ship-chr 1130359236
/0x
# Junk after table footer

View file

@ -0,0 +1,3 @@
XDUMP ship-chr 1130359236
/x
# Malformed table footer

View file

@ -0,0 +1,7 @@
config infrastructure
name lcm hcm dcost mcost enab
"road network" 2 2 2 1 1
"rail network" 1 1 1 1 1
"defense factor" 1 1 1 1 0
/con
# Malformed table footer

View file

@ -0,0 +1,7 @@
XDUMP infrastructure 1133466732
"road\040network" 2 2 2 1 1
"rail\040network" 1 1 1 1 1
"defense\040factor" 1 1 1 1 0
"lala" 1 1 1 1 1
# Too many rows
/4

View file

@ -0,0 +1,3 @@
XDUMP ship-chr 1130359236
/2
# Read 0 rows, which doesn't match footer 2 rows

View file

@ -0,0 +1,3 @@
config news
timestamp
# Extraneous header timestamp in field 1

View file

@ -0,0 +1,3 @@
config sect
uid ...
# Extraneous header uid in field 1

View file

@ -0,0 +1,3 @@
XDUMP ship 1130359236 junk
# Junk after xdump header
/0

View file

@ -0,0 +1,2 @@
junk
# Expected xdump header

View file

@ -0,0 +1,2 @@
config map
# Table `map' is not permitted here

View file

@ -0,0 +1,2 @@
config table
# Table `table' is not permitted here

View file

@ -0,0 +1,5 @@
config ship
uid ...
/config
config plane
# Expected table `ship', not `plane'

View file

@ -0,0 +1,2 @@
XDUMP xxx 1
# Unknown table `xxx'