automate unit test for nsis installer
I have written installer with multiple sections in nsis. i would like have framework similar to java to unit test the code a developer writes. request all to share there practises
9 posts
Function DoubleIt
Exch $0
IntOp $0 $0 * 2
Exch $0
FunctionEnd
Section
Push 42
Call DoubleIt
Pop $0
SetOutPath $InstDir\$0
File Foo.exe
File Bar.dll
SectionEnd DoubleIt assumes there is a parameter on the stack and it fails to handle overflow if the number is large and you could write tests for these things (at least the overflow) but how would you deal with the files?StrCpy $0 Reg0
...
StrCpy $R9 RegR9
Push whatever
Call TheFunction
StrCmp $0 Reg0 ...
... (Some functions return their value in $0 etc. but you get the point)I created a .nsh to help detect this.Originally Posted by Anders View PostFor functions, one thing you can verify is that they don't clobber the registers.