From c4e4cff1d20ab2ebe0ccdbd9f974b2a01395f619 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 25 Nov 2005 11:33:33 +0000 Subject: [PATCH] some basic preprocessor tests git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4425 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/Tests/preprocessor.nsi | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Source/Tests/preprocessor.nsi diff --git a/Source/Tests/preprocessor.nsi b/Source/Tests/preprocessor.nsi new file mode 100644 index 00000000..786eeb4c --- /dev/null +++ b/Source/Tests/preprocessor.nsi @@ -0,0 +1,42 @@ +Name preprocessor +OutFile preprocessor.exe + +!ifdef some_define_that_doesnt_exist +this should not be executed, so no error should be raised +/* +code inside comments should not be executed +!ifdef +*/ +!endif + +!ifdef d1 +!error "d1 is not defined!" +!else ifdef d2 +!error "d2 is not defined!" +!else +# this should be compiled +!endif + +!define d1 + +!ifdef d1 +# this should be compiled +!else ifdef d2 +!error "d2 is not defined!" +!else +!error "d1 is defined!" +!endif + +!undef d1 +!define d2 + +!ifdef d1 +!error "d1 is not defined!" +!else ifdef d2 +# this should be compiled +!else +!error "d2 is defined!" +!endif + +Section +SectionEnd