diff options
author | Haru <haru@dotalux.com> | 2015-04-19 21:21:17 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-04-25 19:11:14 +0200 |
commit | 5968552a393436aaf2d092cfb5da71903ca31960 (patch) | |
tree | 10c0dd3ebe230d7962f1d298eebdda5800ba84a2 /npc | |
parent | cb3652004f979f2efd3ea3ad397e306165ada79b (diff) | |
download | hercules-5968552a393436aaf2d092cfb5da71903ca31960.tar.gz hercules-5968552a393436aaf2d092cfb5da71903ca31960.tar.bz2 hercules-5968552a393436aaf2d092cfb5da71903ca31960.tar.xz hercules-5968552a393436aaf2d092cfb5da71903ca31960.zip |
Added set reference testcase to the script test suite
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc')
-rw-r--r-- | npc/dev/test.txt | 7 |
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,{ |