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:
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>
|
Reference in New Issue
Block a user