forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvalVariableNames.test
More file actions
34 lines (27 loc) · 1.05 KB
/
Copy pathEvalVariableNames.test
File metadata and controls
34 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
setup
local tScript
put "local sScript" & return & \
"global gScriptGlobal" & return & \
"global gSharedGlobal" & return & \
"on testMe pParam" & return & \
" local tLocal" & return & \
" global gHandlerGlobal" & return & \
" global gSharedGlobal" & return & \
" set the cVariableNames of me to the variableNames" & return & \
"end testMe" into tScript
create button
set the script of button 1 to tScript
local tParam = "abcd"
send "testMe tParam" to button 1
test the number of lines in the cVariableNames of button 1 is 4
test line 1 of the cVariableNames of button 1 is "pParam"
test line 2 of the cVariableNames of button 1 is "tLocal"
test line 3 of the cVariableNames of button 1 is "sScript"
local tGlobals
put line 4 of the cVariableNames of button 1 into tGlobals
test "gScriptGlobal" is among the items of tGlobals
test "gHandlerGlobal" is among the items of tGlobals
test "gSharedGlobal" is among the items of tGlobals
delete item itemOffset("gSharedGlobal", tGlobals) of tGlobals
test "gSharedGlobal" is not among the items of tGlobals
teardown