Mock input for testing regex triggers?

Posted by Kahenraz on Mon 12 Sep 2016 12:32 PM — 3 posts, 16,960 views.

#0
Is there a way to send mock output to the world to test against complex regex matches?

Edit:
Can't modify title. Should be mock output. :)
Amended on Mon 12 Sep 2016 12:33 PM by Kahenraz
USA #1
I think you're looking for the Simulate() function.

Template:function=Simulate
Simulate

The documentation for the Simulate script function is available online. It is also in the MUSHclient help file.

Amended on Tue 13 Sep 2016 04:31 AM by hogarius
Australia Forum Administrator #2
I usually use "Debug Simulated World Input" (Shift+Ctrl+F12) - see the Game menu. It's labelled Game -> Test Trigger ...

You can type multiple lines of input (use Ctrl+Enter for a newline) and there is a box at the top for entering special sequences like ANSI codes, MXP codes and Unicode. Make sure you have a final newline (blank line) after the test otherwise the trigger won't fire (yet).

For scripted testing the Simulate function could be used (this could be handy if you are testing the same thing many times). However the "Test Trigger" dialog remembers your last test, so you can re-test the same thing simply by doing Shift+Ctrl+F12 followed by Enter.