wesnoth/data/test/macros/start_position_generic.cfg
Steve Cotton c5dec73784 Unit tests: make separate files for each starting position
Turn the 4 side setup of the firststrike_and_laststrike test into a macro
called `COMMON_KEEP_A_B_C_D`for reuse in other tests.

The comment for `GENERIC_UNIT_TEST` gets a couple of extra paragraphs.

All the files get wmlindent run on them, which reindents `FAIL_IF_NOT`.

The main reason for having these is separate files is Git's fuzzy-patch
matching when merging and rebasing. Having large blocks of identical text
in `wml_unit_test_macros.cfg` can mean the wrong section gets patched.
2022-04-18 04:48:53 +02:00

60 lines
1.3 KiB
INI

#textdomain wesnoth-test
##
# Starting state:
# Side 1 leader Alice (Elvish Archer)
# Side 2 leader Bob (Orcish Grunt)
#
# Both leaders are on keeps separated by a few hexes, close enough for either
# of them to move next to the other leader in a single turn for an attack.
#
# Both keeps have space to recruit a single unit.
##
#define GENERIC_UNIT_TEST NAME CONTENT
#arg SIDE1_CONTROLLER
human#endarg
#arg SIDE2_CONTROLLER
human#endarg
#arg TURNS
-1#endarg
#arg SIDE1_RECRUIT
#endarg
#arg SIDE1_GOLD
100#endarg
#arg SIDE1_LEADER
Elvish Archer#endarg
[test]
name = _ "Unit Test " + {NAME}
map_file=test/maps/generic_unit_test.map
turns = {TURNS}
id = {NAME}
is_unit_test = yes
{DAWN}
[side]
side=1
controller={SIDE1_CONTROLLER}
recruit={SIDE1_RECRUIT}
gold={SIDE1_GOLD}
[leader]
name = _ "Alice"
type = {SIDE1_LEADER}
id=alice
[/leader]
[/side]
[side]
side=2
controller={SIDE2_CONTROLLER}
[leader]
name = _ "Bob"
type = Orcish Grunt
id=bob
[/leader]
[/side]
{CONTENT}
[/test]
#enddef