initial: nsJson plugin 1.1.3
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
!include MUI2.nsh
|
||||
|
||||
Name `nsJSON plug-in`
|
||||
OutFile nsJSON_Syntax.exe
|
||||
RequestExecutionLevel user
|
||||
ShowInstDetails show
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_LANGUAGE English
|
||||
|
||||
!macro DoTest JSON Description
|
||||
StrCpy $R0 ``
|
||||
ClearErrors
|
||||
nsJSON::Set /value `${JSON}`
|
||||
nsJSON::Serialize
|
||||
Pop $R0
|
||||
DetailPrint `${Description}:`
|
||||
DetailPrint `${JSON} -> $R0`
|
||||
IfErrors 0 +2
|
||||
DetailPrint `Error flag is set!`
|
||||
DetailPrint ``
|
||||
!macroend
|
||||
|
||||
Section
|
||||
|
||||
!insertmacro DoTest `{ "Input": [ { "test1": false, } ] }` `Trailing comma`
|
||||
|
||||
!insertmacro DoTest `{ "Input": [ { "test1": false } .? ] }` `Junk characters`
|
||||
|
||||
!insertmacro DoTest `{ "Input": [ { "test1": false } }` `Missing square bracket`
|
||||
|
||||
!insertmacro DoTest `{ "Input": [ { "test1": false ] }` `Missing curly brace`
|
||||
|
||||
SectionEnd
|
||||
Reference in New Issue
Block a user