Test cases for reading terrain, monster, and item definitions
- For monster attacks, 'd4' now means '1d4' instead of '0d4', and simple numbers without a 'd' are not accepted - Pop string path after pushing it in the shop test cases
This commit is contained in:
7
test/files/items/bad_abil.xml
Normal file
7
test/files/items/bad_abil.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<ability>
|
||||
<type>bad</type>
|
||||
</ability>
|
||||
</item>
|
||||
</items>
|
7
test/files/items/bad_abil_tag.xml
Normal file
7
test/files/items/bad_abil_tag.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<ability>
|
||||
<bad></bad>
|
||||
</ability>
|
||||
</item>
|
||||
</items>
|
7
test/files/items/bad_prop.xml
Normal file
7
test/files/items/bad_prop.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<properties>
|
||||
<bad></bad>
|
||||
</properties>
|
||||
</item>
|
||||
</items>
|
1
test/files/items/bad_root_attr.xml
Normal file
1
test/files/items/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<items vers="2.0.0"></items>
|
5
test/files/items/bad_tag.xml
Normal file
5
test/files/items/bad_tag.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<bad></bad>>
|
||||
</item>
|
||||
</items>
|
1
test/files/items/bad_toplevel.xml
Normal file
1
test/files/items/bad_toplevel.xml
Normal file
@@ -0,0 +1 @@
|
||||
<items boes="2.0.0"><obj></obj></items>
|
5
test/files/items/bad_type.xml
Normal file
5
test/files/items/bad_type.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<variety>bad</variety>
|
||||
</item>
|
||||
</items>
|
7
test/files/items/bad_use.xml
Normal file
7
test/files/items/bad_use.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<ability>
|
||||
<use-flag>bad</use-flag>
|
||||
</ability>
|
||||
</item>
|
||||
</items>
|
5
test/files/items/bad_weapon.xml
Normal file
5
test/files/items/bad_weapon.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<weapon-type>bad</weapon-type>
|
||||
</item>
|
||||
</items>
|
11
test/files/items/minimal.xml
Normal file
11
test/files/items/minimal.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<variety>weapon-1hand</variety>
|
||||
<level>3</level>
|
||||
<pic>0</pic>
|
||||
<value>100</value>
|
||||
<weight>10</weight>
|
||||
<full-name>Test Sword</full-name>
|
||||
<name>Sword</name>
|
||||
</item>
|
||||
</items>
|
5
test/files/items/missing_abil.xml
Normal file
5
test/files/items/missing_abil.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<items boes="2.0.0">
|
||||
<item id='0'>
|
||||
<ability></ability>
|
||||
</item>
|
||||
</items>
|
1
test/files/items/missing_id.xml
Normal file
1
test/files/items/missing_id.xml
Normal file
@@ -0,0 +1 @@
|
||||
<items boes="2.0.0"><item></item></items>
|
1
test/files/items/missing_req.xml
Normal file
1
test/files/items/missing_req.xml
Normal file
@@ -0,0 +1 @@
|
||||
<items boes="2.0.0"><item id='0'></item></items>
|
1
test/files/items/no_version.xml
Normal file
1
test/files/items/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<items></items>
|
19
test/files/monsters/attacks.xml
Normal file
19
test/files/monsters/attacks.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<name>Test Monster</name>
|
||||
<level>1</level>
|
||||
<armor>0</armor>
|
||||
<skill>1</skill>
|
||||
<hp>10</hp>
|
||||
<speed>4</speed>
|
||||
<race>humanoid</race>
|
||||
<attacks>
|
||||
<attack type='swing'>d10</attack>
|
||||
<attack type='punch'>2d4</attack>
|
||||
<attack type='burn'>1d8</attack>
|
||||
</attacks>
|
||||
<pic h='1' w='1'>0</pic>
|
||||
<attitude>hostile-a</attitude>
|
||||
<immunity/>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_attack.xml
Normal file
7
test/files/monsters/bad_attack.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack type='swing'>bad</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_attack2.xml
Normal file
7
test/files/monsters/bad_attack2.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack type='swing'>100</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_attack_attr.xml
Normal file
7
test/files/monsters/bad_attack_attr.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack kind='bad'>1d4</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_attack_tag.xml
Normal file
7
test/files/monsters/bad_attack_tag.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<bad/>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_attack_type.xml
Normal file
7
test/files/monsters/bad_attack_type.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack type='bad'>1d4</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
1
test/files/monsters/bad_id.xml
Normal file
1
test/files/monsters/bad_id.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters boes="2.0.0"><monster id='0'></monster></monsters>
|
7
test/files/monsters/bad_immune.xml
Normal file
7
test/files/monsters/bad_immune.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<immunity>
|
||||
<unholy>50</unholy>
|
||||
</immunity>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/bad_loot.xml
Normal file
7
test/files/monsters/bad_loot.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<loot>
|
||||
<bad/>
|
||||
</loot>
|
||||
</monster>
|
||||
</monsters>
|
5
test/files/monsters/bad_loot2.xml
Normal file
5
test/files/monsters/bad_loot2.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<loot/>
|
||||
</monster>
|
||||
</monsters>
|
5
test/files/monsters/bad_pic.xml
Normal file
5
test/files/monsters/bad_pic.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<pic>5</pic>
|
||||
</monster>
|
||||
</monsters>
|
5
test/files/monsters/bad_pic2.xml
Normal file
5
test/files/monsters/bad_pic2.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<pic h='1' v='1'>5</pic>
|
||||
</monster>
|
||||
</monsters>
|
1
test/files/monsters/bad_root_attr.xml
Normal file
1
test/files/monsters/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters vers="2.0.0"></monsters>
|
5
test/files/monsters/bad_tag.xml
Normal file
5
test/files/monsters/bad_tag.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<bad></bad>>
|
||||
</monster>
|
||||
</monsters>
|
1
test/files/monsters/bad_toplevel.xml
Normal file
1
test/files/monsters/bad_toplevel.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters boes="2.0.0"><monst></monst></monsters>
|
15
test/files/monsters/minimal.xml
Normal file
15
test/files/monsters/minimal.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<name>Test Monster</name>
|
||||
<level>1</level>
|
||||
<armor>0</armor>
|
||||
<skill>2</skill>
|
||||
<hp>10</hp>
|
||||
<speed>4</speed>
|
||||
<race>humanoid</race>
|
||||
<attacks/>
|
||||
<pic h='1' w='1'>5</pic>
|
||||
<attitude>hostile-a</attitude>
|
||||
<immunity/>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/monsters/missing_attack_type.xml
Normal file
7
test/files/monsters/missing_attack_type.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack>1d4</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
1
test/files/monsters/missing_id.xml
Normal file
1
test/files/monsters/missing_id.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters boes="2.0.0"><monster></monster></monsters>
|
1
test/files/monsters/missing_req.xml
Normal file
1
test/files/monsters/missing_req.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters boes="2.0.0"><monster id='1'></monster></monsters>
|
1
test/files/monsters/no_version.xml
Normal file
1
test/files/monsters/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<monsters></monsters>
|
10
test/files/monsters/too_many_attacks.xml
Normal file
10
test/files/monsters/too_many_attacks.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<monsters boes="2.0.0">
|
||||
<monster id='1'>
|
||||
<attacks>
|
||||
<attack type='swing'>1d4</attack>
|
||||
<attack type='swing'>1d4</attack>
|
||||
<attack type='swing'>1d4</attack>
|
||||
<attack type='swing'>1d4</attack>
|
||||
</attacks>
|
||||
</monster>
|
||||
</monsters>
|
7
test/files/terrain/bad_abil.xml
Normal file
7
test/files/terrain/bad_abil.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<special>
|
||||
<type>bad</type>
|
||||
</special>
|
||||
</terrain>
|
||||
</terrains>
|
7
test/files/terrain/bad_abil_tag.xml
Normal file
7
test/files/terrain/bad_abil_tag.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<special>
|
||||
<bad></bad>
|
||||
</special>
|
||||
</terrain>
|
||||
</terrains>
|
5
test/files/terrain/bad_block.xml
Normal file
5
test/files/terrain/bad_block.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<blockage>bad</blockage>
|
||||
</terrain>
|
||||
</terrains>
|
1
test/files/terrain/bad_root_attr.xml
Normal file
1
test/files/terrain/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<terrains vers="2.0.0"></terrains>
|
5
test/files/terrain/bad_tag.xml
Normal file
5
test/files/terrain/bad_tag.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<bad></bad>
|
||||
</terrain>
|
||||
</terrains>
|
1
test/files/terrain/bad_toplevel.xml
Normal file
1
test/files/terrain/bad_toplevel.xml
Normal file
@@ -0,0 +1 @@
|
||||
<terrains boes="2.0.0"><ter></ter></terrains>
|
5
test/files/terrain/bad_trim.xml
Normal file
5
test/files/terrain/bad_trim.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<trim>bad</trim>
|
||||
</terrain>
|
||||
</terrains>
|
13
test/files/terrain/minimal.xml
Normal file
13
test/files/terrain/minimal.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<name>Test Terrain</name>
|
||||
<pic>0</pic>
|
||||
<map>0</map>
|
||||
<blockage>move</blockage>
|
||||
<trim>none</trim>
|
||||
<arena>0</arena>
|
||||
<special>
|
||||
<type>none</type>
|
||||
</special>
|
||||
</terrain>
|
||||
</terrains>
|
5
test/files/terrain/missing_abil.xml
Normal file
5
test/files/terrain/missing_abil.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<special></special>
|
||||
</terrain>
|
||||
</terrains>
|
1
test/files/terrain/missing_id.xml
Normal file
1
test/files/terrain/missing_id.xml
Normal file
@@ -0,0 +1 @@
|
||||
<terrains boes="2.0.0"><terrain></terrain></terrains>
|
1
test/files/terrain/missing_req.xml
Normal file
1
test/files/terrain/missing_req.xml
Normal file
@@ -0,0 +1 @@
|
||||
<terrains boes="2.0.0"><terrain id='0'></terrain></terrains>
|
1
test/files/terrain/no_version.xml
Normal file
1
test/files/terrain/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<terrains></terrains>
|
11
test/files/terrain/too_many_flags.xml
Normal file
11
test/files/terrain/too_many_flags.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<terrains boes="2.0.0">
|
||||
<terrain id='0'>
|
||||
<special>
|
||||
<type>none</type>
|
||||
<flag>0</flag>
|
||||
<flag>0</flag>
|
||||
<flag>0</flag>
|
||||
<flag>0</flag>
|
||||
</special>
|
||||
</terrain>
|
||||
</terrains>
|
Reference in New Issue
Block a user