diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-12 02:29:53 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-14 14:42:06 +0100 |
commit | 44624ba935aee3b8559ec8309331bda3ea37879c (patch) | |
tree | 4d4e48579f6aa5686beb276b6de0ccfdc1744cbb /tests | |
parent | 1ff950b571c0634bbf219ab9c603c338f12d0005 (diff) | |
download | msitools-44624ba935aee3b8559ec8309331bda3ea37879c.tar.gz msitools-44624ba935aee3b8559ec8309331bda3ea37879c.tar.xz msitools-44624ba935aee3b8559ec8309331bda3ea37879c.zip |
tests: test wixl ifdef condition
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/wixl/IncludeTest.wxs | 11 | ||||
-rw-r--r-- | tests/wixl.at | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/tests/data/wixl/IncludeTest.wxs b/tests/data/wixl/IncludeTest.wxs index 776e574..a5ea0c7 100644 --- a/tests/data/wixl/IncludeTest.wxs +++ b/tests/data/wixl/IncludeTest.wxs @@ -1,5 +1,12 @@ <?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> - <?include IncludeWarn.wxi ?> + <?ifdef var.Foo?> + <?warning Foo?> + <?else?> + <?ifdef var.Bar?> + <?warning Bar?> + <?else?> + <?include IncludeWarn.wxi ?> + <?endif?> + <?endif?> </Wix> - diff --git a/tests/wixl.at b/tests/wixl.at index bbd4a22..4e3eb9a 100644 --- a/tests/wixl.at +++ b/tests/wixl.at @@ -86,12 +86,18 @@ AT_CHECK_WIXL([-E variables.wxs -D Foo -D Zig=Zag], [0], [<?xml version="1.0"?> ], [ignore]) AT_CLEANUP -AT_SETUP([Preprocessor include]) +AT_SETUP([Preprocessor include & condition]) AT_WIXLDATA([IncludeTest.wxs]) AT_WIXLDATA([IncludeWarn.wxi]) AT_CHECK_WIXL([-o out.msi IncludeTest.wxs], [0], [ignore], [IncludeWarn.wxi:3: warning: IncludeWarn is included ]) +AT_CHECK_WIXL([-D Bar -o out.msi IncludeTest.wxs], [0], [ignore], +[IncludeTest.wxs:7: warning: Bar +]) +AT_CHECK_WIXL([-D Foo -o out.msi IncludeTest.wxs], [0], [ignore], +[IncludeTest.wxs:4: warning: Foo +]) # FIXME: add tons of tests on out.msi AT_CHECK([test -f out.msi], [0]) AT_CLEANUP |