]> git.pond.sub.org Git - empserver/commitdiff
tests/actofgod: Test give and edit for each item type
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 27 Aug 2017 11:19:10 +0000 (13:19 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 06:23:45 +0000 (07:23 +0100)
The test covers only 'c' and 'l' with give, 'm' and 'g' with edit.
Cover the other item types, too.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
tests/actofgod/final.xdump
tests/actofgod/geninput.pl
tests/actofgod/journal.log

index 582d665156452b656db1ea389e7c27c7ab524a45..198c9af1aeff604e9d36af0ba0bc1347edfeb012 100644 (file)
@@ -59,7 +59,7 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd
 1 4 6 4 0 0 0 0 0 0 0 0 0 4 6 0 0 100 0 4 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 6 6 4 0 0 0 0 0 0 0 0 0 6 6 0 0 100 0 4 0 0 0 0 0 1 9999 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 8 6 4 0 0 0 0 0 0 0 0 0 8 6 0 0 100 0 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
-1 10 6 4 0 0 0 0 0 0 0 0 0 10 6 0 0 100 0 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
+1 10 6 4 0 0 0 0 0 0 0 0 0 10 6 0 0 100 0 4 0 0 0 0 0 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 2 -12 6 4 0 0 0 0 0 0 0 0 0 -12 6 0 0 100 0 4 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 2 -10 6 4 0 0 0 0 0 0 0 0 0 -10 6 0 0 100 0 4 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 2 -8 6 4 0 0 0 0 0 0 0 0 0 -8 6 0 0 100 0 4 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
@@ -171,7 +171,7 @@ config ship
 uid owner xloc yloc type effic mobil off tech opx opy mission radius fleet civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime access name xbuilt ybuilt builder rflags rpath
 0 0 1 -1 2 0 2 0 100 0 0 none 0 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 healthy 0 0 "" 1 -1 3 () ""
 1 98 1 -1 2 20 0 0 100 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 -1 3 () ""
-2 2 3 -1 2 20 -127 0 20 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 -1 3 (group) ""
+2 2 3 -1 2 20 -127 0 20 0 0 none 0 "" 1 1 1 1 0 0 0 0 1 0 1 1 1 0 healthy 0 0 "" 1 -1 3 (group) ""
 3 3 1 -1 2 20 -127 0 20 0 0 none 0 "a" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 "" 1 -1 3 (injured) "jj"
 4 3 1 -1 2 100 127 0 32767 0 0 none 0 "" 0 50 0 0 0 0 0 0 0 0 0 0 0 0 exposed 32767 0 "" 1 -1 3 () ""
 5 3 1 -1 2 100 127 0 32767 0 0 none 0 "" 0 50 0 0 0 0 0 0 0 0 0 0 0 0 exposed 32767 0 "" 1 -1 3 () ""
@@ -195,7 +195,7 @@ 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
 0 0 1 -1 6 0 2 0 100 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
 1 98 1 -1 6 10 0 0 100 0 0 none 0 "" -1 0 42 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
-2 2 3 -1 6 10 -127 0 50 0 0 none 0 "" -1 0 0 (group) "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
+2 2 3 -1 6 10 -127 0 50 0 0 none 0 "" -1 0 0 (group) "" 0 1 1 1 1 1 1 0 1 0 1 1 0 0 healthy 0 -1 0
 3 3 1 -1 6 10 -127 0 50 0 0 none 0 "a" 3 0 0 (injured) "jj" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
 4 3 3 -1 6 100 127 0 32767 0 0 none 0 "" 2 127 100 () "" 0 25 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
 5 3 1 -1 6 100 127 0 32767 0 0 none 0 "" -1 127 100 () "" 0 25 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
@@ -218,15 +218,17 @@ actor action victim times duration time
 0 44 1 32 0 0
 0 43 2 6 0 0
 0 44 3 28 0 0
-0 43 1 77 0 0
-0 42 1 6 0 0
+0 43 1 74 0 0
+0 42 1 20 0 0
 1 45 0 3 0 0
 0 43 3 38 0 0
 0 44 2 7 0 0
 0 42 3 4 0 0
+0 42 2 17 0 0
 0 43 4 2 0 0
 0 44 1 1 0 0
 0 43 2 4 0 0
+0 43 1 3 0 0
 0 33 0 2 0 0
 /config
 config trade
index c176e42d70e68ba194f2c8ec217bff146df12456..7f822358c77211a42e9e43012fc3f9613921b78f 100755 (executable)
@@ -212,6 +212,9 @@ give('2,6', 'l', $INT_MIN);
 give('4:8,6', 'c', 1);
 give('6,6', 'c', $INT_MAX);
 give('8,6', 'c', -1);
+for my $key (split(//, 'cmsgpidbfolhur')) {
+    give('10,6', $key, 1);
+}
 
 # swapsector
 swaps('-2,2', '2,-2');
@@ -304,6 +307,13 @@ for my $ef ('ship', 'land') {
     edit($ef, 3, 'W', 513, 'W', 1030, 'W', 2);
 }
 
+# items
+for my $ef ('ship', 'land') {
+    for my $key (split(//, 'cmsgpidfolhur')) {
+       edit($ef, 2, $key, 1);
+    }
+}
+
 # plane: flags
 # Take care to have only valid bits set in final state
 edit('plane', 2, 'f', 4);
index 270243f5ea49d0bfc83c3bd6e1e38df4aff2ccb6..32175423630eb0224c9e201b3f7661e98ee5cc3e 100644 (file)
     Play#0 command give
     Play#0 output Play#0 1 1 civilians in 8,6
     Play#0 output Play#0 6 0 640
+    Play#0 input give c 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 2 civilians in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give m 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 2 military in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give s 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 shells in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give g 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 guns in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give p 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 petrol in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give i 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 iron ore in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give d 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 dust (gold) in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give b 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 bars of gold in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give f 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 food in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give o 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 oil in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give l 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 light products in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give h 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 heavy products in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give u 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 uncompensated workers in 10,6
+    Play#0 output Play#0 6 0 640
+    Play#0 input give r 10,6 1
+    Play#0 command give
+    Play#0 output Play#0 1 1 radioactive materials in 10,6
+    Play#0 output Play#0 6 0 640
     Play#0 input swaps -2,2 2,-2
     Play#0 command swapsector
     Play#0 output Play#0 1 own   sect        eff  min gold fert oil uran
     Play#0 output Play#0 1 Retreat condition of sup  supply #3 changed: injured, torpedoed, #10 set, and group, #9 cleared
     Play#0 output Play#0 1 Retreat condition of sup  supply #3 changed: torpedoed, #10 cleared
     Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 c 1
+    Play#0 command edit
+    Play#0 output Play#0 1 civilians of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 m 1
+    Play#0 command edit
+    Play#0 output Play#0 1 military of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 s 1
+    Play#0 command edit
+    Play#0 output Play#0 1 shells of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 g 1
+    Play#0 command edit
+    Play#0 output Play#0 1 guns of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 p 1
+    Play#0 command edit
+    Play#0 output Play#0 1 petrol of cs   cargo ship (#2) unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 i 1
+    Play#0 command edit
+    Play#0 output Play#0 1 iron ore of cs   cargo ship (#2) unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 d 1
+    Play#0 command edit
+    Play#0 output Play#0 1 dust (gold) of cs   cargo ship (#2) unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 f 1
+    Play#0 command edit
+    Play#0 output Play#0 1 food of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 o 1
+    Play#0 command edit
+    Play#0 output Play#0 1 oil of cs   cargo ship (#2) unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 l 1
+    Play#0 command edit
+    Play#0 output Play#0 1 light products of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 h 1
+    Play#0 command edit
+    Play#0 output Play#0 1 heavy products of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 u 1
+    Play#0 command edit
+    Play#0 output Play#0 1 uncompensated workers of cs   cargo ship (#2) changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit s 2 r 1
+    Play#0 command edit
+    Play#0 output Play#0 1 radioactive materials of cs   cargo ship (#2) unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 c 1
+    Play#0 command edit
+    Play#0 output Play#0 1 civilians of sup  supply #2 unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 m 1
+    Play#0 command edit
+    Play#0 output Play#0 1 military of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 s 1
+    Play#0 command edit
+    Play#0 output Play#0 1 shells of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 g 1
+    Play#0 command edit
+    Play#0 output Play#0 1 guns of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 p 1
+    Play#0 command edit
+    Play#0 output Play#0 1 petrol of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 i 1
+    Play#0 command edit
+    Play#0 output Play#0 1 iron ore of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 d 1
+    Play#0 command edit
+    Play#0 output Play#0 1 dust (gold) of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 f 1
+    Play#0 command edit
+    Play#0 output Play#0 1 food of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 o 1
+    Play#0 command edit
+    Play#0 output Play#0 1 oil of sup  supply #2 unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 l 1
+    Play#0 command edit
+    Play#0 output Play#0 1 light products of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 h 1
+    Play#0 command edit
+    Play#0 output Play#0 1 heavy products of sup  supply #2 changed from 0 to 1
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 u 1
+    Play#0 command edit
+    Play#0 output Play#0 1 uncompensated workers of sup  supply #2 unchanged
+    Play#0 output Play#0 6 0 640
+    Play#0 input edit u 2 r 1
+    Play#0 command edit
+    Play#0 output Play#0 1 radioactive materials of sup  supply #2 unchanged
+    Play#0 output Play#0 6 0 640
     Play#0 input edit p 2 f 4
     Play#0 command edit
     Play#0 output Play#0 1 Flags of f1   Sopwith Camel #2 changed: airburst set
     Play#0 output Play#0 1 POGO gave you 1 civilians in 8,6
     Play#0 output Play#0 1 POGO gave you 9997 civilians in 6,6
     Play#0 output Play#0 1 POGO stole 1 civilians from 8,6
+    Play#0 output Play#0 1 POGO gave you 1 civilians in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 military in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 shells in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 guns in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 petrol in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 iron ore in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 dust (gold) in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 bars of gold in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 food in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 oil in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 light products in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 heavy products in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 uncompensated workers in 10,6
+    Play#0 output Play#0 1 POGO gave you 1 radioactive materials in 10,6
     Play#0 output Play#0 1 lc   light cruiser (#6) given to you by an act of POGO!
     Play#0 output Play#0 1 Type of lc   light cruiser (#6) changed to hc   heavy cruiser by an act of POGO
     Play#0 output Play#0 1 POGO gave you 8 guns in hc   heavy cruiser (#6)
     Play#0 output Play#0 1 Tech level of 10kt  fission warhead #2 changed from 400 to 280 by an act of POGO
     Play#0 output Play#0 1 Retreat conditions of cs   cargo ship (#2) changed by an act of POGO: group set
     Play#0 output Play#0 1 Retreat condition of sup  supply #2 changed by an act of POGO: group set
+    Play#0 output Play#0 1 POGO gave you 1 civilians in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 military in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 shells in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 guns in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 food in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 light products in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 heavy products in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 uncompensated workers in cs   cargo ship (#2)
+    Play#0 output Play#0 1 POGO gave you 1 military in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 shells in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 guns in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 petrol in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 iron ore in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 dust (gold) in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 food in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 light products in sup  supply #2
+    Play#0 output Play#0 1 POGO gave you 1 heavy products in sup  supply #2
     Play#0 output Play#0 1 Flags of f1   Sopwith Camel #2 changed by an act of POGO: airburst set
     Play#0 output Play#0 1 Technology changed from 0.00 to 100.00 by an act of POGO!
     Play#0 output Play#0 1 Research changed from 0.00 to 100.00 by an act of POGO!