How about something like this?
[spoiler][code]“Test”
Include Basic Screen Effects by Emily Short.
Include (-
#Iftrue ({-value:NUMBER_CREATED(test_scenario)} > 0);
[ TestScriptSub;
switch(special_word) {
{-call:Plugins::Parsing::TestScripts::compile_switch}
default:
print “>–> The following tests are available:^”;
{-call:Plugins::Parsing::TestScripts::compile_printout}
}
];
#ifdef TARGET_GLULX;
Constant TEST_STACK_SIZE = 128;
#ifnot;
Constant TEST_STACK_SIZE = 48;
#endif;
Array test_stack --> TEST_STACK_SIZE;
Global test_sp = 0;
[ TestStart T R l k;
if (test_sp >= TEST_STACK_SIZE) “>–> Testing too many levels deep”;
test_stack–>test_sp = T;
test_stack–>(test_sp+1) = 0;
test_stack–>(test_sp+3) = l;
test_sp = test_sp + 4;
if ((R–>0) && (R–>0 ~= real_location)) {
print "(first moving to ", (name) R–>0, “)^”;
PlayerTo(R–>0, 1);
}
k=1;
while (R–>k) {
if (R–>k notin player) {
print "(first acquiring ", (the) R–>k, “)^”;
move R–>k to player;
}
k++;
}
print “(Testing.)^”; say__p = 1;
];
[ TestKeyboardPrimitive a_buffer a_table p i j l spaced ch;
if (test_sp == 0) {
test_stack–>2 = 1;
(+ testing mode +) = false;
return VM_ReadKeyboard(a_buffer, a_table);
}
else {
p = test_stack–>(test_sp-4);
i = test_stack–>(test_sp-3);
l = test_stack–>(test_sp-1);
(+ testing mode +) = true;
print “[”;
print test_stack–>2;
print "] ";
test_stack–>2 = test_stack–>2 + 1;
style bold;
while ((i < l) && (p->i ~= ‘/’)) {
ch = p->i;
if (spaced || (ch ~= ’ ')) {
if ((p->i == ‘[’) && (p->(i+1) == ‘/’) && (p->(i+2) == ‘]’)) {
ch = ‘/’; i = i+2;
}
a_buffer->(j+WORDSIZE) = ch;
print (char) ch;
i++; j++;
spaced = true;
} else i++;
}
style roman;
print “^”;
#ifdef TARGET_ZCODE;
a_buffer->1 = j;
#ifnot; ! TARGET_GLULX
a_buffer–>0 = j;
#endif;
VM_Tokenise(a_buffer, a_table);
if (p->i == ‘/’) i++;
if (i >= l) {
test_sp = test_sp - 4;
} else test_stack–>(test_sp-3) = i;
}
];
#IFNOT;
[ TestScriptSub;
“>–> No test scripts exist for this game.”;
];
#ENDIF;
-) instead of “Test Command” in “Tests.i6t”.
To pause the/-- game:
say “[paragraph break]Please press SPACE to continue.”;
if testing mode is false, wait for the SPACE key;
clear the screen.
Testing mode is a truth state that varies. Testing mode is false.
After waiting (this is the pause game waiting rule):
say “You wait a waitly wait!”;
pause the game.
The Testing Room is A Room.
Test me with “wait / jump”.[/code][/spoiler]
You can see the difference by typing the commands into the command prompt and then using the “test me” command.
Hope this helps.