Basic test cases for reading town, dialogue, and outdoor records
This commit is contained in:
1
test/files/outdoor/bad_root_attr.xml
Normal file
1
test/files/outdoor/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<sector vers="2.0.0"></sector>
|
||||
3
test/files/outdoor/bad_toplevel.xml
Normal file
3
test/files/outdoor/bad_toplevel.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<sector boes="2.0.0">
|
||||
<bad/>
|
||||
</sector>
|
||||
5
test/files/outdoor/encounter_bad_attr.xml
Normal file
5
test/files/outdoor/encounter_bad_attr.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<sector boes="2.0.0">
|
||||
<encounter>
|
||||
<monster human='false'/>
|
||||
</encounter>
|
||||
</sector>
|
||||
5
test/files/outdoor/encounter_bad_node.xml
Normal file
5
test/files/outdoor/encounter_bad_node.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<sector boes="2.0.0">
|
||||
<encounter>
|
||||
<bad/>
|
||||
</encounter>
|
||||
</sector>
|
||||
3
test/files/outdoor/encounter_empty.xml
Normal file
3
test/files/outdoor/encounter_empty.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<sector boes="2.0.0">
|
||||
<encounter/>
|
||||
</sector>
|
||||
7
test/files/outdoor/encounter_too_many.xml
Normal file
7
test/files/outdoor/encounter_too_many.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<sector boes="2.0.0">
|
||||
<encounter><monster>0</monster></encounter>
|
||||
<encounter><monster>0</monster></encounter>
|
||||
<encounter><monster>0</monster></encounter>
|
||||
<encounter><monster>0</monster></encounter>
|
||||
<encounter><monster>0</monster></encounter>
|
||||
</sector>
|
||||
8
test/files/outdoor/encounter_too_many_monst.xml
Normal file
8
test/files/outdoor/encounter_too_many_monst.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<sector boes="2.0.0">
|
||||
<encounter>
|
||||
<monster friendly='true'>0</monster>
|
||||
<monster friendly='true'>0</monster>
|
||||
<monster friendly='true'>0</monster>
|
||||
<monster friendly='true'>0</monster>
|
||||
</encounter>
|
||||
</sector>
|
||||
3
test/files/outdoor/minimal.xml
Normal file
3
test/files/outdoor/minimal.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<sector boes="2.0.0">
|
||||
<name>Test Sector</name>
|
||||
</sector>
|
||||
1
test/files/outdoor/missing_toplevel.xml
Normal file
1
test/files/outdoor/missing_toplevel.xml
Normal file
@@ -0,0 +1 @@
|
||||
<sector boes="2.0.0"></sector>
|
||||
1
test/files/outdoor/no_version.xml
Normal file
1
test/files/outdoor/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<sector></sector>
|
||||
3
test/files/talk/bad_node.xml
Normal file
3
test/files/talk/bad_node.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<bad/>
|
||||
</dialogue>
|
||||
1
test/files/talk/bad_root_attr.xml
Normal file
1
test/files/talk/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<dialogue vers="2.0.0"></dialogue>
|
||||
1
test/files/talk/empty.xml
Normal file
1
test/files/talk/empty.xml
Normal file
@@ -0,0 +1 @@
|
||||
<dialogue boes="2.0.0"></dialogue>
|
||||
1
test/files/talk/no_version.xml
Normal file
1
test/files/talk/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<dialogue></dialogue>
|
||||
5
test/files/talk/node_bad_node.xml
Normal file
5
test/files/talk/node_bad_node.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<bad/>
|
||||
</node>
|
||||
</dialogue>
|
||||
3
test/files/talk/node_missing_for.xml
Normal file
3
test/files/talk/node_missing_for.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node/>
|
||||
</dialogue>
|
||||
3
test/files/talk/node_missing_key.xml
Normal file
3
test/files/talk/node_missing_key.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'/>
|
||||
</dialogue>
|
||||
6
test/files/talk/node_missing_string.xml
Normal file
6
test/files/talk/node_missing_string.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<keyword>what</keyword>
|
||||
<type>0</type>
|
||||
</node>
|
||||
</dialogue>
|
||||
5
test/files/talk/node_missing_type.xml
Normal file
5
test/files/talk/node_missing_type.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<keyword/>
|
||||
</node>
|
||||
</dialogue>
|
||||
7
test/files/talk/node_too_many_keys.xml
Normal file
7
test/files/talk/node_too_many_keys.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<keyword/>
|
||||
<keyword/>
|
||||
<keyword/>
|
||||
</node>
|
||||
</dialogue>
|
||||
9
test/files/talk/node_too_many_params.xml
Normal file
9
test/files/talk/node_too_many_params.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<param>0</param>
|
||||
<param>0</param>
|
||||
<param>0</param>
|
||||
<param>0</param>
|
||||
<param>0</param>
|
||||
</node>
|
||||
</dialogue>
|
||||
7
test/files/talk/node_too_many_strings.xml
Normal file
7
test/files/talk/node_too_many_strings.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<node for='0'>
|
||||
<text/>
|
||||
<text/>
|
||||
<text/>
|
||||
</node>
|
||||
</dialogue>
|
||||
3
test/files/talk/who_bad_id.xml
Normal file
3
test/files/talk/who_bad_id.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<personality id='10'/>
|
||||
</dialogue>
|
||||
5
test/files/talk/who_bad_node.xml
Normal file
5
test/files/talk/who_bad_node.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<personality id='0'>
|
||||
<bad/>
|
||||
</personality>
|
||||
</dialogue>
|
||||
3
test/files/talk/who_missing_id.xml
Normal file
3
test/files/talk/who_missing_id.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<personality/>
|
||||
</dialogue>
|
||||
3
test/files/talk/who_missing_req.xml
Normal file
3
test/files/talk/who_missing_req.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<dialogue boes="2.0.0">
|
||||
<personality id='0'/>
|
||||
</dialogue>
|
||||
7
test/files/town/bad_creature.xml
Normal file
7
test/files/town/bad_creature.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<creature id='1'>
|
||||
<level/>
|
||||
</creature>
|
||||
</town>
|
||||
5
test/files/town/bad_exit_dir.xml
Normal file
5
test/files/town/bad_exit_dir.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<exit dir='up' x='0' y='0'/>
|
||||
</town>
|
||||
7
test/files/town/bad_flag.xml
Normal file
7
test/files/town/bad_flag.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<flags>
|
||||
<whoops/>
|
||||
</flags>
|
||||
</town>
|
||||
7
test/files/town/bad_item.xml
Normal file
7
test/files/town/bad_item.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<item id='1'>
|
||||
<level/>
|
||||
</item>
|
||||
</town>
|
||||
5
test/files/town/bad_onenter_condition.xml
Normal file
5
test/files/town/bad_onenter_condition.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<onenter condition='kumquat'/>
|
||||
</town>
|
||||
5
test/files/town/bad_onexit_dir.xml
Normal file
5
test/files/town/bad_onexit_dir.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<onexit dir='up'/>
|
||||
</town>
|
||||
1
test/files/town/bad_root_attr.xml
Normal file
1
test/files/town/bad_root_attr.xml
Normal file
@@ -0,0 +1 @@
|
||||
<town vers="2.0.0"></town>
|
||||
3
test/files/town/bad_size.xml
Normal file
3
test/files/town/bad_size.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<town boes="2.0.0">
|
||||
<size>1</size>
|
||||
</town>
|
||||
4
test/files/town/bad_toplevel.xml
Normal file
4
test/files/town/bad_toplevel.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<error/>
|
||||
</town>
|
||||
7
test/files/town/bad_wandering.xml
Normal file
7
test/files/town/bad_wandering.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<wandering>
|
||||
<creature/>
|
||||
</wandering>
|
||||
</town>
|
||||
5
test/files/town/empty_creature.xml
Normal file
5
test/files/town/empty_creature.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<creature id='1'/>
|
||||
</town>
|
||||
5
test/files/town/empty_item.xml
Normal file
5
test/files/town/empty_item.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<item id='1'/>
|
||||
</town>
|
||||
5
test/files/town/empty_wandering.xml
Normal file
5
test/files/town/empty_wandering.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<wandering/>
|
||||
</town>
|
||||
8
test/files/town/minimal.xml
Normal file
8
test/files/town/minimal.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Test Town</name>
|
||||
<bounds top='4' left='4' right='28' bottom='28'/>
|
||||
<difficulty>1</difficulty>
|
||||
<lighting>lit</lighting>
|
||||
<flags/>
|
||||
</town>
|
||||
1
test/files/town/missing_toplevel.xml
Normal file
1
test/files/town/missing_toplevel.xml
Normal file
@@ -0,0 +1 @@
|
||||
<town boes="2.0.0"></town>
|
||||
1
test/files/town/no_version.xml
Normal file
1
test/files/town/no_version.xml
Normal file
@@ -0,0 +1 @@
|
||||
<town></town>
|
||||
4
test/files/town/size_not_first.xml
Normal file
4
test/files/town/size_not_first.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<town boes="2.0.0">
|
||||
<name>Hello World</name>
|
||||
<size>32</size>
|
||||
</town>
|
||||
8
test/files/town/too_many_comments.xml
Normal file
8
test/files/town/too_many_comments.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<comment>This</comment>
|
||||
<comment>is</comment>
|
||||
<comment>a</comment>
|
||||
<comment>comment</comment>
|
||||
</town>
|
||||
13
test/files/town/too_many_timers.xml
Normal file
13
test/files/town/too_many_timers.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<town boes="2.0.0">
|
||||
<size>32</size>
|
||||
<name>Hello World</name>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
<timer freq='10'>0</timer>
|
||||
</town>
|
||||
Reference in New Issue
Block a user