summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-06 16:20:09 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-06 16:38:27 +0100
commit5ec247c7951827cf8ef10f0c5b0c4cfb10f79cd8 (patch)
treebd63b8aa8683f33c6644790f755d913d08c2250b /tests
parentd819ed2bd5d4ff1177c18b92a153be74eb0766b8 (diff)
downloadmsitools-5ec247c7951827cf8ef10f0c5b0c4cfb10f79cd8.tar.gz
msitools-5ec247c7951827cf8ef10f0c5b0c4cfb10f79cd8.tar.xz
msitools-5ec247c7951827cf8ef10f0c5b0c4cfb10f79cd8.zip
Add ŚampleFirst test
Diffstat (limited to 'tests')
-rw-r--r--tests/data/FoobarAppl10.exe1
-rw-r--r--tests/data/Helper.dll1
-rw-r--r--tests/data/Manual.pdf1
-rw-r--r--tests/data/SampleFirst.wxs61
-rw-r--r--tests/testsuite.at29
5 files changed, 92 insertions, 1 deletions
diff --git a/tests/data/FoobarAppl10.exe b/tests/data/FoobarAppl10.exe
new file mode 100644
index 0000000..c1b0730
--- /dev/null
+++ b/tests/data/FoobarAppl10.exe
@@ -0,0 +1 @@
+x \ No newline at end of file
diff --git a/tests/data/Helper.dll b/tests/data/Helper.dll
new file mode 100644
index 0000000..c1b0730
--- /dev/null
+++ b/tests/data/Helper.dll
@@ -0,0 +1 @@
+x \ No newline at end of file
diff --git a/tests/data/Manual.pdf b/tests/data/Manual.pdf
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/tests/data/Manual.pdf
@@ -0,0 +1 @@
+1 \ No newline at end of file
diff --git a/tests/data/SampleFirst.wxs b/tests/data/SampleFirst.wxs
new file mode 100644
index 0000000..5df18d8
--- /dev/null
+++ b/tests/data/SampleFirst.wxs
@@ -0,0 +1,61 @@
+<?xml version='1.0' encoding='windows-1252'?>
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+ <Product Name='Foobar 1.0' Id='YOURGUID-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='YOURGUID-7349-453F-94F6-BCB5110BA4FD'
+ Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'>
+
+ <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer"
+ Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.'
+ InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+
+ <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
+ <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />
+
+ <Directory Id='TARGETDIR' Name='SourceDir'>
+ <Directory Id='ProgramFilesFolder' Name='PFiles'>
+ <Directory Id='Acme' Name='Acme'>
+ <Directory Id='INSTALLDIR' Name='Foobar 1.0'>
+
+ <Component Id='MainExecutable' Guid='YOURGUID-83F1-4F22-985B-FDB3C8ABD471'>
+ <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'>
+ <Shortcut Id="startmenuFoobar10" Directory="ProgramMenuDir" Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe" IconIndex="0" Advertise="yes" />
+ <Shortcut Id="desktopFoobar10" Directory="DesktopFolder" Name="Foobar 1.0" WorkingDirectory='INSTALLDIR' Icon="Foobar10.exe" IconIndex="0" Advertise="yes" />
+ </File>
+ </Component>
+
+ <Component Id='HelperLibrary' Guid='YOURGUID-6BE3-460D-A14F-75658D16550B'>
+ <File Id='HelperDLL' Name='Helper.dll' DiskId='1' Source='Helper.dll' KeyPath='yes' />
+ </Component>
+
+ <Component Id='Manual' Guid='YOURGUID-574D-4A9A-A266-5B5EC2C022A4'>
+ <File Id='Manual' Name='Manual.pdf' DiskId='1' Source='Manual.pdf' KeyPath='yes'>
+ <Shortcut Id="startmenuManual" Directory="ProgramMenuDir" Name="Instruction Manual" Advertise="yes" />
+ </File>
+ </Component>
+
+ </Directory>
+ </Directory>
+ </Directory>
+
+ <Directory Id="ProgramMenuFolder" Name="Programs">
+ <Directory Id="ProgramMenuDir" Name="Foobar 1.0">
+ <Component Id="ProgramMenuDir" Guid="YOURGUID-7E98-44CE-B049-C477CC0A2B00">
+ <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
+ <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
+ </Component>
+ </Directory>
+ </Directory>
+
+ <Directory Id="DesktopFolder" Name="Desktop" />
+ </Directory>
+
+ <Feature Id='Complete' Level='1'>
+ <ComponentRef Id='MainExecutable' />
+ <ComponentRef Id='HelperLibrary' />
+ <ComponentRef Id='Manual' />
+ <ComponentRef Id='ProgramMenuDir' />
+ </Feature>
+
+ <Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />
+
+ </Product>
+</Wix>
diff --git a/tests/testsuite.at b/tests/testsuite.at
index bdcf7a2..acb2e01 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,4 +1,31 @@
m4_include([package.m4])
AT_INIT
-AT_BANNER([wixl]) \ No newline at end of file
+AT_BANNER([wixl])
+
+# AT_CHECK_... - add exeext automatically
+m4_define([AT_CHECK_WIXL], [
+AT_CHECK([_wixl ]$@)])
+
+# AT_WIXLDATA - copy data file from source tree
+m4_define([AT_WIXLDATA], [
+dir=`dirname $1`
+AS_MKDIR_P([$dir])
+AT_CHECK([cp $abs_srcdir/tests/data/$1 $1])])
+
+
+AT_SETUP([Invalid command line])
+AT_CHECK_WIXL([], [1], [ignore], [ignore])
+AT_CHECK_WIXL([out.msi], [1], [ignore], [ignore])
+AT_CHECK([test -f out.msi], [1])
+AT_CLEANUP
+
+AT_SETUP([WiX tutorial SampleFirst])
+AT_WIXLDATA([SampleFirst.wxs])
+AT_WIXLDATA([FoobarAppl10.exe])
+AT_WIXLDATA([Helper.dll])
+AT_WIXLDATA([Manual.pdf])
+AT_CHECK_WIXL([out.msi SampleFirst.wxs], [0], [ignore], [ignore])
+# FIXME: add tons of tests on out.msi
+AT_CHECK([test -f out.msi], [0])
+AT_CLEANUP