Fix the indentation in test_lua_wml
This main change here is moving tags to their own line, to avoid wmlindent bug #1397. The lua gets a manual tabs-to-spaces conversion.
This commit is contained in:
parent
dd864d5a4a
commit
adf39d3d4a
1 changed files with 48 additions and 38 deletions
|
@ -1,14 +1,16 @@
|
|||
# wmllint: no translatables
|
||||
|
||||
{GENERIC_UNIT_TEST "test_wml_actions" (
|
||||
[event]
|
||||
name = start
|
||||
[lua]
|
||||
code = <<
|
||||
function wesnoth.wml_actions.foo(cfg)
|
||||
if cfg.bar then
|
||||
wml.variables["result"] = cfg.bar
|
||||
end
|
||||
end
|
||||
>>
|
||||
function wesnoth.wml_actions.foo(cfg)
|
||||
if cfg.bar then
|
||||
wml.variables["result"] = cfg.bar
|
||||
end
|
||||
end
|
||||
>>
|
||||
[/lua]
|
||||
|
||||
{VARIABLE result 0}
|
||||
|
@ -39,39 +41,47 @@
|
|||
name = start
|
||||
[lua]
|
||||
code = <<
|
||||
function wesnoth.wml_conditionals.foo(cfg)
|
||||
return (cfg.bar == "baz")
|
||||
end
|
||||
>>
|
||||
function wesnoth.wml_conditionals.foo(cfg)
|
||||
return (cfg.bar == "baz")
|
||||
end
|
||||
>>
|
||||
[/lua]
|
||||
|
||||
{ASSERT ([foo]
|
||||
bar = "baz"
|
||||
[/foo])}
|
||||
{ASSERT ([not]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/not])}
|
||||
{ASSERT ([foo]
|
||||
bar = "baz"
|
||||
[/foo]
|
||||
[or]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/or])}
|
||||
{ASSERT ([not]
|
||||
[foo]
|
||||
bar = "baz"
|
||||
[/foo]
|
||||
[and]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/and]
|
||||
[/not])}
|
||||
{ASSERT (
|
||||
[foo]
|
||||
bar = "baz"
|
||||
[/foo]
|
||||
)}
|
||||
{ASSERT (
|
||||
[not]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/not]
|
||||
)}
|
||||
{ASSERT (
|
||||
[foo]
|
||||
bar = "baz"
|
||||
[/foo]
|
||||
[or]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/or]
|
||||
)}
|
||||
{ASSERT (
|
||||
[not]
|
||||
[foo]
|
||||
bar = "baz"
|
||||
[/foo]
|
||||
[and]
|
||||
[foo]
|
||||
bar = "boo"
|
||||
[/foo]
|
||||
[/and]
|
||||
[/not]
|
||||
)}
|
||||
|
||||
{SUCCEED}
|
||||
[/event]
|
||||
{SUCCEED}
|
||||
[/event]
|
||||
)}
|
||||
|
|
Loading…
Add table
Reference in a new issue