]> git.pond.sub.org Git - empserver/commitdiff
tests/empdump: New; exercising the empdump utility
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 29 Jan 2014 19:24:26 +0000 (20:24 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2015 15:52:59 +0000 (16:52 +0100)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
81 files changed:
Make.mk
tests/empdump-test [new file with mode: 0755]
tests/empdump/errors.err [new file with mode: 0644]
tests/empdump/errors.status [new file with mode: 0644]
tests/empdump/verify-fails [new file with mode: 0644]
tests/empdump/verify-fixed [new file with mode: 0644]
tests/empdump/verify-prep [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-amb [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-dup [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-dup2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-dup3 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-ellipsis [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-ellipsis2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-ellipsis3 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-ellipsis4 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-ellipsis5 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-eof [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-first [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-idxbig [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-idxneg [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-idxreq [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-junk [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-junk2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-junk3 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-malidx [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-malidx2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-malidx3 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-miss [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-miss2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-noidx [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-sep [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-symidx [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-unexp2 [new file with mode: 0644]
tests/empdump/xundump-errors/colhdr-unk [new file with mode: 0644]
tests/empdump/xundump-errors/fld-ambsym [new file with mode: 0644]
tests/empdump/xundump-errors/fld-badnum [new file with mode: 0644]
tests/empdump/xundump-errors/fld-constnum [new file with mode: 0644]
tests/empdump/xundump-errors/fld-conststr [new file with mode: 0644]
tests/empdump/xundump-errors/fld-conststr2 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-eof [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invesc [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invid [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invid1 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invid2 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invid3 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-invid4 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-junk [new file with mode: 0644]
tests/empdump/xundump-errors/fld-junk2 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-malnum [new file with mode: 0644]
tests/empdump/xundump-errors/fld-malstr [new file with mode: 0644]
tests/empdump/xundump-errors/fld-many [new file with mode: 0644]
tests/empdump/xundump-errors/fld-miss [new file with mode: 0644]
tests/empdump/xundump-errors/fld-miss2 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-nonil [new file with mode: 0644]
tests/empdump/xundump-errors/fld-nonum [new file with mode: 0644]
tests/empdump/xundump-errors/fld-nostr [new file with mode: 0644]
tests/empdump/xundump-errors/fld-nosym [new file with mode: 0644]
tests/empdump/xundump-errors/fld-nosymset [new file with mode: 0644]
tests/empdump/xundump-errors/fld-sep [new file with mode: 0644]
tests/empdump/xundump-errors/fld-strbig [new file with mode: 0644]
tests/empdump/xundump-errors/fld-unexpid [new file with mode: 0644]
tests/empdump/xundump-errors/fld-unexpid1 [new file with mode: 0644]
tests/empdump/xundump-errors/fld-unksym [new file with mode: 0644]
tests/empdump/xundump-errors/fld-unparen [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-fewrows [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-fewrows2 [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-fewrows3 [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-fewrows4 [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-junk [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-mal [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-mal2 [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-manyrows [new file with mode: 0644]
tests/empdump/xundump-errors/ftr-mismatch [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-extra [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-extra2 [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-junk [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-none [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-noperm [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-noperm2 [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-unexp [new file with mode: 0644]
tests/empdump/xundump-errors/hdr-unktab [new file with mode: 0644]

diff --git a/Make.mk b/Make.mk
index 2cd5efc4a244e20f5f53e8839667476f3753ab68..f0a00b93fd415be94251093fa64cf18d1d4b0249 100644 (file)
--- a/Make.mk
+++ b/Make.mk
@@ -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
diff --git a/tests/empdump-test b/tests/empdump-test
new file mode 100755 (executable)
index 0000000..f3f4103
--- /dev/null
@@ -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
diff --git a/tests/empdump/errors.err b/tests/empdump/errors.err
new file mode 100644 (file)
index 0000000..97db388
--- /dev/null
@@ -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)
diff --git a/tests/empdump/errors.status b/tests/empdump/errors.status
new file mode 100644 (file)
index 0000000..3a96297
--- /dev/null
@@ -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
diff --git a/tests/empdump/verify-fails b/tests/empdump/verify-fails
new file mode 100644 (file)
index 0000000..03d784b
--- /dev/null
@@ -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
diff --git a/tests/empdump/verify-fixed b/tests/empdump/verify-fixed
new file mode 100644 (file)
index 0000000..ad94dc2
--- /dev/null
@@ -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
diff --git a/tests/empdump/verify-prep b/tests/empdump/verify-prep
new file mode 100644 (file)
index 0000000..3f68a37
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/colhdr-amb b/tests/empdump/xundump-errors/colhdr-amb
new file mode 100644 (file)
index 0000000..ed00499
--- /dev/null
@@ -0,0 +1,4 @@
+config sect-chr
+uid name m
+# Header m of field 3 is ambiguous
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-dup b/tests/empdump/xundump-errors/colhdr-dup
new file mode 100644 (file)
index 0000000..6edfa2d
--- /dev/null
@@ -0,0 +1,3 @@
+config ship-chr
+name name
+# Duplicate header name in field 2
diff --git a/tests/empdump/xundump-errors/colhdr-dup2 b/tests/empdump/xundump-errors/colhdr-dup2
new file mode 100644 (file)
index 0000000..2fb2be7
--- /dev/null
@@ -0,0 +1,8 @@
+config ship-chr
+type name ...
+/config
+
+config ship-chr
+type name name
+# Duplicate header name in field 3
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-dup3 b/tests/empdump/xundump-errors/colhdr-dup3
new file mode 100644 (file)
index 0000000..bef172d
--- /dev/null
@@ -0,0 +1,4 @@
+config item
+uid name mnem value sell lbs pkg(0) pkg(0)
+# Duplicate header pkg(0) in field 8
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-ellipsis b/tests/empdump/xundump-errors/colhdr-ellipsis
new file mode 100644 (file)
index 0000000..3cf6e02
--- /dev/null
@@ -0,0 +1,3 @@
+config product
+...
+# Header field uid required in each table part
diff --git a/tests/empdump/xundump-errors/colhdr-ellipsis2 b/tests/empdump/xundump-errors/colhdr-ellipsis2
new file mode 100644 (file)
index 0000000..6d202d8
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+uid ... name
+# Junk after ...
diff --git a/tests/empdump/xundump-errors/colhdr-ellipsis3 b/tests/empdump/xundump-errors/colhdr-ellipsis3
new file mode 100644 (file)
index 0000000..1cf602c
--- /dev/null
@@ -0,0 +1,3 @@
+config infrastructure
+name ...
+# Table infrastructure doesn't support ...
diff --git a/tests/empdump/xundump-errors/colhdr-ellipsis4 b/tests/empdump/xundump-errors/colhdr-ellipsis4
new file mode 100644 (file)
index 0000000..cc65144
--- /dev/null
@@ -0,0 +1,3 @@
+config product
+sname name ...
+# Header field uid required in each table part
diff --git a/tests/empdump/xundump-errors/colhdr-ellipsis5 b/tests/empdump/xundump-errors/colhdr-ellipsis5
new file mode 100644 (file)
index 0000000..1a95aa5
--- /dev/null
@@ -0,0 +1,4 @@
+config sect
+xloc yloc ...
+# Table sect doesn't support ...
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-eof b/tests/empdump/xundump-errors/colhdr-eof
new file mode 100644 (file)
index 0000000..ee64c5e
--- /dev/null
@@ -0,0 +1 @@
+config ship-chr # Unexpected EOF
diff --git a/tests/empdump/xundump-errors/colhdr-first b/tests/empdump/xundump-errors/colhdr-first
new file mode 100644 (file)
index 0000000..3077bea
--- /dev/null
@@ -0,0 +1,4 @@
+config ship
+owner uid ...
+# Header field uid must come first
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-idxbig b/tests/empdump/xundump-errors/colhdr-idxbig
new file mode 100644 (file)
index 0000000..fdbecd3
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+uid name mnem value sell lbs pkg(99)
+# Header pkg(99) index out of bounds in field 7
diff --git a/tests/empdump/xundump-errors/colhdr-idxneg b/tests/empdump/xundump-errors/colhdr-idxneg
new file mode 100644 (file)
index 0000000..3ae1ca4
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+uid name mnem value sell lbs pkg(-1)
+# Index must not be negative in header field 7
diff --git a/tests/empdump/xundump-errors/colhdr-idxreq b/tests/empdump/xundump-errors/colhdr-idxreq
new file mode 100644 (file)
index 0000000..1cc3394
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+uid name mnem value sell lbs pkg
+# Header pkg requires an index in field 7
diff --git a/tests/empdump/xundump-errors/colhdr-junk b/tests/empdump/xundump-errors/colhdr-junk
new file mode 100644 (file)
index 0000000..f9e544d
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+0
+# Junk in header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-junk2 b/tests/empdump/xundump-errors/colhdr-junk2
new file mode 100644 (file)
index 0000000..3e3f0c9
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+/config
+# Junk in header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-junk3 b/tests/empdump/xundump-errors/colhdr-junk3
new file mode 100644 (file)
index 0000000..25838bd
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+.a
+# Junk in header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-malidx b/tests/empdump/xundump-errors/colhdr-malidx
new file mode 100644 (file)
index 0000000..aafaa8a
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+x(-
+# Malformed number in index of header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-malidx2 b/tests/empdump/xundump-errors/colhdr-malidx2
new file mode 100644 (file)
index 0000000..54b92f1
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+x(!
+# Malformed index in header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-malidx3 b/tests/empdump/xundump-errors/colhdr-malidx3
new file mode 100644 (file)
index 0000000..46e3999
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+x(0 y
+# Malformed index in header field 1
diff --git a/tests/empdump/xundump-errors/colhdr-miss b/tests/empdump/xundump-errors/colhdr-miss
new file mode 100644 (file)
index 0000000..c00f566
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/colhdr-miss2 b/tests/empdump/xundump-errors/colhdr-miss2
new file mode 100644 (file)
index 0000000..044641e
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/colhdr-noidx b/tests/empdump/xundump-errors/colhdr-noidx
new file mode 100644 (file)
index 0000000..ec0bec2
--- /dev/null
@@ -0,0 +1,3 @@
+config ship-chr
+name(0)
+# Header name doesn't take an index in field 1
diff --git a/tests/empdump/xundump-errors/colhdr-sep b/tests/empdump/xundump-errors/colhdr-sep
new file mode 100644 (file)
index 0000000..7cc9bed
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+u=
+# Bad field separator after field 1
diff --git a/tests/empdump/xundump-errors/colhdr-symidx b/tests/empdump/xundump-errors/colhdr-symidx
new file mode 100644 (file)
index 0000000..1d6bb92
--- /dev/null
@@ -0,0 +1,3 @@
+config item
+f(x)
+# Symbolic index in header field 1 not yet implemented
diff --git a/tests/empdump/xundump-errors/colhdr-unexp2 b/tests/empdump/xundump-errors/colhdr-unexp2
new file mode 100644 (file)
index 0000000..aa09d1a
--- /dev/null
@@ -0,0 +1,4 @@
+config item
+uid name mnem value sell lbs pkg(1)
+# Expected header pkg(0) in field 7
+/config
diff --git a/tests/empdump/xundump-errors/colhdr-unk b/tests/empdump/xundump-errors/colhdr-unk
new file mode 100644 (file)
index 0000000..a529501
--- /dev/null
@@ -0,0 +1,4 @@
+config ship-chr
+xxx
+# Header xxx of field 1 is unknown
+/config
diff --git a/tests/empdump/xundump-errors/fld-ambsym b/tests/empdump/xundump-errors/fld-ambsym
new file mode 100644 (file)
index 0000000..e100d25
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-badnum b/tests/empdump/xundump-errors/fld-badnum
new file mode 100644 (file)
index 0000000..f0bfe26
--- /dev/null
@@ -0,0 +1,4 @@
+config land
+uid owner ...
+0 1.1
+# Field 2 can't hold this value
diff --git a/tests/empdump/xundump-errors/fld-constnum b/tests/empdump/xundump-errors/fld-constnum
new file mode 100644 (file)
index 0000000..410ad88
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-conststr b/tests/empdump/xundump-errors/fld-conststr
new file mode 100644 (file)
index 0000000..b2501ae
--- /dev/null
@@ -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"
diff --git a/tests/empdump/xundump-errors/fld-conststr2 b/tests/empdump/xundump-errors/fld-conststr2
new file mode 100644 (file)
index 0000000..c5a4a07
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-eof b/tests/empdump/xundump-errors/fld-eof
new file mode 100644 (file)
index 0000000..5ec2382
--- /dev/null
@@ -0,0 +1,2 @@
+XDUMP ship-chr 0
+0 # Unexpected EOF
\ No newline at end of file
diff --git a/tests/empdump/xundump-errors/fld-invesc b/tests/empdump/xundump-errors/fld-invesc
new file mode 100644 (file)
index 0000000..ba24795
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
+"lala\0"
+# Invalid escape sequence in field 1
diff --git a/tests/empdump/xundump-errors/fld-invid b/tests/empdump/xundump-errors/fld-invid
new file mode 100644 (file)
index 0000000..4860a5a
--- /dev/null
@@ -0,0 +1,4 @@
+config ship
+uid ...
+0.1
+# Field 1 can't hold this value
diff --git a/tests/empdump/xundump-errors/fld-invid1 b/tests/empdump/xundump-errors/fld-invid1
new file mode 100644 (file)
index 0000000..2a59fcf
--- /dev/null
@@ -0,0 +1,4 @@
+config item
+uid ...
+1
+# Expected 0 in field 1
diff --git a/tests/empdump/xundump-errors/fld-invid2 b/tests/empdump/xundump-errors/fld-invid2
new file mode 100644 (file)
index 0000000..5b40538
--- /dev/null
@@ -0,0 +1,4 @@
+config ship
+uid ...
+-1
+# Field 1 must be > -1
diff --git a/tests/empdump/xundump-errors/fld-invid3 b/tests/empdump/xundump-errors/fld-invid3
new file mode 100644 (file)
index 0000000..17675dc
--- /dev/null
@@ -0,0 +1,5 @@
+config ship
+uid ...
+2
+0
+# Field 1 must be > 2
diff --git a/tests/empdump/xundump-errors/fld-invid4 b/tests/empdump/xundump-errors/fld-invid4
new file mode 100644 (file)
index 0000000..7343785
--- /dev/null
@@ -0,0 +1,4 @@
+config nat
+cnum ...
+100
+# Field 1 must be <= 98
diff --git a/tests/empdump/xundump-errors/fld-junk b/tests/empdump/xundump-errors/fld-junk
new file mode 100644 (file)
index 0000000..f3e16f4
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
+!
+# Junk in field 1
diff --git a/tests/empdump/xundump-errors/fld-junk2 b/tests/empdump/xundump-errors/fld-junk2
new file mode 100644 (file)
index 0000000..f8726ee
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-malnum b/tests/empdump/xundump-errors/fld-malnum
new file mode 100644 (file)
index 0000000..5495e5b
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
++
+# Malformed number in field 1
diff --git a/tests/empdump/xundump-errors/fld-malstr b/tests/empdump/xundump-errors/fld-malstr
new file mode 100644 (file)
index 0000000..d2f039a
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
+"lala
+# Malformed string in field 1
diff --git a/tests/empdump/xundump-errors/fld-many b/tests/empdump/xundump-errors/fld-many
new file mode 100644 (file)
index 0000000..aaa9e78
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-miss b/tests/empdump/xundump-errors/fld-miss
new file mode 100644 (file)
index 0000000..d92284b
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP item 0
+0
+# Field name missing
diff --git a/tests/empdump/xundump-errors/fld-miss2 b/tests/empdump/xundump-errors/fld-miss2
new file mode 100644 (file)
index 0000000..eaeb3c9
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP product 0
+0 "iron\040ore" "iron"
+# Field ctype(0) missing
diff --git a/tests/empdump/xundump-errors/fld-nonil b/tests/empdump/xundump-errors/fld-nonil
new file mode 100644 (file)
index 0000000..d1b65fc
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-nonum b/tests/empdump/xundump-errors/fld-nonum
new file mode 100644 (file)
index 0000000..85d3d73
--- /dev/null
@@ -0,0 +1,4 @@
+config item
+uid name ...
+0 0
+# Field 2 doesn't take numbers
diff --git a/tests/empdump/xundump-errors/fld-nostr b/tests/empdump/xundump-errors/fld-nostr
new file mode 100644 (file)
index 0000000..b8fb9df
--- /dev/null
@@ -0,0 +1,4 @@
+config item
+uid ...
+""
+# Field 1 doesn't take strings
diff --git a/tests/empdump/xundump-errors/fld-nosym b/tests/empdump/xundump-errors/fld-nosym
new file mode 100644 (file)
index 0000000..b9e2b07
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
+xxx
+# Field 1 doesn't take symbols
diff --git a/tests/empdump/xundump-errors/fld-nosymset b/tests/empdump/xundump-errors/fld-nosymset
new file mode 100644 (file)
index 0000000..579e4ac
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP infrastructure 0
+()
+# Field 1 doesn't take symbol sets
diff --git a/tests/empdump/xundump-errors/fld-sep b/tests/empdump/xundump-errors/fld-sep
new file mode 100644 (file)
index 0000000..9d42337
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP ship-chr 0
+0!
+# Bad field separator after field 1
diff --git a/tests/empdump/xundump-errors/fld-strbig b/tests/empdump/xundump-errors/fld-strbig
new file mode 100644 (file)
index 0000000..4996734
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-unexpid b/tests/empdump/xundump-errors/fld-unexpid
new file mode 100644 (file)
index 0000000..3b85502
--- /dev/null
@@ -0,0 +1,8 @@
+config ship
+uid ...
+/config
+config ship
+uid ...
+2
+# Table's first part doesn't have this row
+/config
diff --git a/tests/empdump/xundump-errors/fld-unexpid1 b/tests/empdump/xundump-errors/fld-unexpid1
new file mode 100644 (file)
index 0000000..fe85f50
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-unksym b/tests/empdump/xundump-errors/fld-unksym
new file mode 100644 (file)
index 0000000..29d31a0
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/fld-unparen b/tests/empdump/xundump-errors/fld-unparen
new file mode 100644 (file)
index 0000000..68f56b5
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/ftr-fewrows b/tests/empdump/xundump-errors/ftr-fewrows
new file mode 100644 (file)
index 0000000..0be2020
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP sect 0
+/0
+# Expected 1024 more rows
diff --git a/tests/empdump/xundump-errors/ftr-fewrows2 b/tests/empdump/xundump-errors/ftr-fewrows2
new file mode 100644 (file)
index 0000000..bb63ac5
--- /dev/null
@@ -0,0 +1,5 @@
+config item
+uid ...
+0
+/config
+# Expected 13 more rows
diff --git a/tests/empdump/xundump-errors/ftr-fewrows3 b/tests/empdump/xundump-errors/ftr-fewrows3
new file mode 100644 (file)
index 0000000..58bd590
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/ftr-fewrows4 b/tests/empdump/xundump-errors/ftr-fewrows4
new file mode 100644 (file)
index 0000000..7136469
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/ftr-junk b/tests/empdump/xundump-errors/ftr-junk
new file mode 100644 (file)
index 0000000..fd8bc3a
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP ship-chr 1130359236
+/0x
+# Junk after table footer
diff --git a/tests/empdump/xundump-errors/ftr-mal b/tests/empdump/xundump-errors/ftr-mal
new file mode 100644 (file)
index 0000000..0779994
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP ship-chr 1130359236
+/x
+# Malformed table footer
diff --git a/tests/empdump/xundump-errors/ftr-mal2 b/tests/empdump/xundump-errors/ftr-mal2
new file mode 100644 (file)
index 0000000..fd50c36
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/ftr-manyrows b/tests/empdump/xundump-errors/ftr-manyrows
new file mode 100644 (file)
index 0000000..6596432
--- /dev/null
@@ -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
diff --git a/tests/empdump/xundump-errors/ftr-mismatch b/tests/empdump/xundump-errors/ftr-mismatch
new file mode 100644 (file)
index 0000000..81159c7
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP ship-chr 1130359236
+/2
+# Read 0 rows, which doesn't match footer 2 rows
diff --git a/tests/empdump/xundump-errors/hdr-extra b/tests/empdump/xundump-errors/hdr-extra
new file mode 100644 (file)
index 0000000..c856f3d
--- /dev/null
@@ -0,0 +1,3 @@
+config news
+timestamp
+# Extraneous header timestamp in field 1
diff --git a/tests/empdump/xundump-errors/hdr-extra2 b/tests/empdump/xundump-errors/hdr-extra2
new file mode 100644 (file)
index 0000000..fa27ebb
--- /dev/null
@@ -0,0 +1,3 @@
+config sect
+uid ...
+# Extraneous header uid in field 1
diff --git a/tests/empdump/xundump-errors/hdr-junk b/tests/empdump/xundump-errors/hdr-junk
new file mode 100644 (file)
index 0000000..fde9308
--- /dev/null
@@ -0,0 +1,3 @@
+XDUMP ship 1130359236 junk
+# Junk after xdump header
+/0
diff --git a/tests/empdump/xundump-errors/hdr-none b/tests/empdump/xundump-errors/hdr-none
new file mode 100644 (file)
index 0000000..700ef86
--- /dev/null
@@ -0,0 +1,2 @@
+junk
+# Expected xdump header
diff --git a/tests/empdump/xundump-errors/hdr-noperm b/tests/empdump/xundump-errors/hdr-noperm
new file mode 100644 (file)
index 0000000..3f5e46a
--- /dev/null
@@ -0,0 +1,2 @@
+config map
+# Table `map' is not permitted here
diff --git a/tests/empdump/xundump-errors/hdr-noperm2 b/tests/empdump/xundump-errors/hdr-noperm2
new file mode 100644 (file)
index 0000000..3bf4d47
--- /dev/null
@@ -0,0 +1,2 @@
+config table
+# Table `table' is not permitted here
diff --git a/tests/empdump/xundump-errors/hdr-unexp b/tests/empdump/xundump-errors/hdr-unexp
new file mode 100644 (file)
index 0000000..dd8ab02
--- /dev/null
@@ -0,0 +1,5 @@
+config ship
+uid ...
+/config
+config plane
+# Expected table `ship', not `plane'
diff --git a/tests/empdump/xundump-errors/hdr-unktab b/tests/empdump/xundump-errors/hdr-unktab
new file mode 100644 (file)
index 0000000..632f51a
--- /dev/null
@@ -0,0 +1,2 @@
+XDUMP xxx 1
+# Unknown table `xxx'