test GetFunctionAddress too
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3181 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
92ec99d190
commit
b2cc8876b9
1 changed files with 27 additions and 24 deletions
|
@ -14,16 +14,18 @@ ShowInstDetails show
|
|||
|
||||
Section "Test 1"
|
||||
|
||||
StrCpy $0 "a"
|
||||
Call test1
|
||||
StrCpy $R0 "a"
|
||||
|
||||
StrCmp $0 "a182345678" success
|
||||
GetFunctionAddress $R1 test1
|
||||
Call $R1
|
||||
|
||||
DetailPrint "Test 1 failed (output: $0)"
|
||||
StrCmp $R0 "a182345678" success
|
||||
|
||||
DetailPrint "Test 1 failed (output: $R0)"
|
||||
Goto end
|
||||
|
||||
success:
|
||||
DetailPrint "Test 1 succeded (output: $0)"
|
||||
DetailPrint "Test 1 succeded (output: $R0)"
|
||||
|
||||
end:
|
||||
|
||||
|
@ -34,17 +36,17 @@ Function test1
|
|||
GetLabelAddress $9 skip
|
||||
|
||||
IntOp $9 $9 - 1
|
||||
StrCpy $0 $01
|
||||
StrCpy $R0 $R01
|
||||
|
||||
Call $9
|
||||
|
||||
StrCpy $0 $02
|
||||
StrCpy $0 $03
|
||||
StrCpy $0 $04
|
||||
StrCpy $0 $05
|
||||
StrCpy $0 $06
|
||||
StrCpy $0 $07
|
||||
StrCpy $0 $08
|
||||
StrCpy $R0 $R02
|
||||
StrCpy $R0 $R03
|
||||
StrCpy $R0 $R04
|
||||
StrCpy $R0 $R05
|
||||
StrCpy $R0 $R06
|
||||
StrCpy $R0 $R07
|
||||
StrCpy $R0 $R08
|
||||
|
||||
skip:
|
||||
|
||||
|
@ -54,18 +56,18 @@ FunctionEnd
|
|||
|
||||
Section "Test 2"
|
||||
|
||||
StrCpy $0 "0"
|
||||
StrCpy $1 "11"
|
||||
StrCpy $R0 "0"
|
||||
StrCpy $R1 "11"
|
||||
|
||||
Call test2
|
||||
|
||||
StrCmp $1 "11,10,9,8,7,6,5,4,3,2,1" success
|
||||
StrCmp $R1 "11,10,9,8,7,6,5,4,3,2,1" success
|
||||
|
||||
DetailPrint "Test 2 failed (output: $1)"
|
||||
DetailPrint "Test 2 failed (output: $R1)"
|
||||
Goto end
|
||||
|
||||
success:
|
||||
DetailPrint "Test 2 succeded (output: $1)"
|
||||
DetailPrint "Test 2 succeded (output: $R1)"
|
||||
|
||||
end:
|
||||
|
||||
|
@ -73,16 +75,17 @@ SectionEnd
|
|||
|
||||
Function test2
|
||||
|
||||
IntOp $0 $0 + 1
|
||||
IntCmp $0 10 done
|
||||
IntOp $R0 $R0 + 1
|
||||
IntCmp $R0 10 done
|
||||
|
||||
Push $0
|
||||
Push $R0
|
||||
|
||||
Call test2
|
||||
GetFunctionAddress $R2 test2
|
||||
Call $R2
|
||||
|
||||
Pop $0
|
||||
Pop $R0
|
||||
|
||||
done:
|
||||
StrCpy $1 "$1,$0"
|
||||
StrCpy $R1 "$R1,$R0"
|
||||
|
||||
FunctionEnd
|
Loading…
Add table
Add a link
Reference in a new issue