test.run: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial entry created)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Languages|test.run}}
{{Languages|test.run}}
{{Experimental}}
{{MacroFunction
{{MacroFunction
|name=test.run
|name=test.run

Latest revision as of 23:59, 31 May 2024

Languages:  English


 This article describes a feature or macro function that is experimental and may be subject to change.

test.run() Function

 Note: This function can only be used in a Trusted Macro

Runs all test: prefixed macros on selected test: tokens. If no tokens selected, runs all test: macros on all test: tokens on the current map. Displays and stores results.

Usage

test.run()

Example

[r: test.run()]

Results of tests are stored on a token property with the name of the test macro as a json object.

[r: getProperty("test: myUDFs")]
output: {"status":"failure","messages":[" Failed, expected 1 got 0"]}

Function changes macro button colour to indicate success or failure.

Success and Failure coloured macros

See Also

Languages:  English