mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 22:43:19 +00:00
Added some conditional unit tests
This commit is contained in:
parent
e8df45fe91
commit
0911b1f4d5
42
data/test/scenarios/conditionals.cfg
Normal file
42
data/test/scenarios/conditionals.cfg
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# This test checks conditional tags
|
||||||
|
|
||||||
|
{GENERIC_UNIT_TEST "check_conditionals_1" (
|
||||||
|
[event]
|
||||||
|
name = start
|
||||||
|
|
||||||
|
[if]
|
||||||
|
[true][/true]
|
||||||
|
[and]
|
||||||
|
[true][/true]
|
||||||
|
[/and]
|
||||||
|
[or]
|
||||||
|
[true][/true]
|
||||||
|
[/or]
|
||||||
|
[not]
|
||||||
|
[false][/false]
|
||||||
|
[/not]
|
||||||
|
[then]
|
||||||
|
{RETURN [true][/true]}
|
||||||
|
[/then]
|
||||||
|
[/if]
|
||||||
|
[/event]
|
||||||
|
)}
|
||||||
|
|
||||||
|
{GENERIC_UNIT_TEST "check_conditionals_2" (
|
||||||
|
[event]
|
||||||
|
name = start
|
||||||
|
|
||||||
|
[if]
|
||||||
|
[true][/true]
|
||||||
|
[and]
|
||||||
|
[true][/true]
|
||||||
|
[/and]
|
||||||
|
[or]
|
||||||
|
[false][/false]
|
||||||
|
[/or]
|
||||||
|
[then]
|
||||||
|
{RETURN [true][/true]}
|
||||||
|
[/then]
|
||||||
|
[/if]
|
||||||
|
[/event]
|
||||||
|
)}
|
@ -132,3 +132,8 @@
|
|||||||
0 test_wml_menu_items_1
|
0 test_wml_menu_items_1
|
||||||
1 test_wml_menu_items_2
|
1 test_wml_menu_items_2
|
||||||
0 test_wml_menu_items_3
|
0 test_wml_menu_items_3
|
||||||
|
#
|
||||||
|
# Conditional tests
|
||||||
|
#
|
||||||
|
0 check_conditionals_1
|
||||||
|
0 check_conditionals_2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user