testScript

 

Tag: testScript
Parent tag: pass
Attributes:

  • file (string) – the file where the Lua script is located
  • script (string) – the script name
  • TEST_MODE (enum) – {RUN_IF (default), RUN_WHILE}

Child tags (none)

The script is executed and if returns false the pass is not executed. If this tag is not present then it is as if the script returned true, and the pass will execute.

When using RUN_IF the procedure is as shown in the following pseudo-code

result = executeScript(file, script)
if (result)
	executePass

When using RUN_WHILE the pass will be executed repeatedly as long as the script returns true, as in the following pseudo-code:

while (executeScript(file, script))
	executePass

Example:

<testScript file="bla.lua" script="test" />