diff --git a/changelog b/changelog index 7bcf8524c2f..19399a1aa26 100644 --- a/changelog +++ b/changelog @@ -126,7 +126,7 @@ Version 1.13.1+dev: * Add new flow control tags: [break], [continue], [return] * Added a new [difficulty] tag for defining a campaign's difficulty level * Add new syntax for [option], similar to the new difficulty syntax - * Add [explain] ActionWML that tells why a conditional failed (for debugging) + * Add [test_condition] ActionWML that tells why a conditional failed (for debugging) * Editor: * Added Category field and color sliders to the Edit Label panel. * Miscellaneous and bug fixes: diff --git a/data/lua/wml-tags.lua b/data/lua/wml-tags.lua index 3f4bb28a385..d5994bac017 100644 --- a/data/lua/wml-tags.lua +++ b/data/lua/wml-tags.lua @@ -505,7 +505,7 @@ function wml_actions.switch(cfg) end -- This is mainly for use in unit test macros, but maybe it can be useful elsewhere too -function wml_actions.explain(cfg) +function wml_actions.test_condition(cfg) local logger = cfg.logger or "warning" -- This function returns true if it managed to explain the failure diff --git a/data/test/macros/wml_unit_test_macros.cfg b/data/test/macros/wml_unit_test_macros.cfg index 8d448c7aa12..27c384e80d1 100644 --- a/data/test/macros/wml_unit_test_macros.cfg +++ b/data/test/macros/wml_unit_test_macros.cfg @@ -9,10 +9,10 @@ [/endlevel] [/then] [else] - [explain] + [test_condition] result=no {X} - [/explain] + [/test_condition] [endlevel] result=defeat linger_mode = yes @@ -25,10 +25,10 @@ [if] {X} [else] - [explain] + [test_condition] result=no {X} - [/explain] + [/test_condition] [endlevel] result=defeat linger_mode = yes