summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/dev/test.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index 7b498e922..a091f5998 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -602,6 +602,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheck, "Callsub (parent scope vars isolation)", .@x, 1);
callsub(OnCheck, "Callsub (nested scopes)", callsub(OnTestNestedScope), 1);
callsub(OnCheck, "Callsub (deeply nested scopes)", callsub(OnTestDeepNestedScope, 30, 0), 1);
+ .@x = 1;
+ .@y = callsub(OnSetReference, .@x);
+ callsub(OnCheck, "Callsub (setting references)", .@y, 2);
+ callsub(OnCheck, "Callsub (setting references)", .@x, 2);
deletearray .@x;
setarray .@x, 1, 2, 3, 4;
callsub(OnCheck, "Callsub (array references)", callsub(OnTestArrayRefs, .@x), 4);
@@ -732,6 +736,9 @@ OnCheckStr:
callsub(OnReportError, .@msg$, .@val$, .@ref$);
}
return;
+OnSetReference:
+ set getarg(0), getarg(0) + 1;
+ return getarg(0);
}
- script HerculesSelfTest -1,{