[msitools: 10/11] tests: add --ext ui test




commit 80edc5390068d1d0547ea2fb30ffc70078981d33
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Sun Sep 12 21:32:15 2021 +0400

    tests: add --ext ui test
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 tests/data/wixl/License.rtf | Bin 0 -> 652 bytes
 tests/data/wixl/TestUI.wxs  |  37 +++++++++++++++++++++++++++++++++++++
 tests/wixl.bats             |   8 ++++++++
 3 files changed, 45 insertions(+)
---
diff --git a/tests/data/wixl/License.rtf b/tests/data/wixl/License.rtf
new file mode 100644
index 0000000..044a0b0
Binary files /dev/null and b/tests/data/wixl/License.rtf differ
diff --git a/tests/data/wixl/TestUI.wxs b/tests/data/wixl/TestUI.wxs
new file mode 100644
index 0000000..e86dfb0
--- /dev/null
+++ b/tests/data/wixl/TestUI.wxs
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='windows-1252'?>
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+  <Product Name='Foobar 1.0' Id='ABCDDCBA-86C7-4D14-AEC0-86416A69ABDE' 
UpgradeCode='ABCDDCBA-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" />
+
+    <UIRef Id="WixUI_Minimal" />
+
+    <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='ABCDDCBA-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>
+          </Directory>
+        </Directory>
+      </Directory>
+    </Directory>
+
+    <Feature Id='Complete' Level='1'>
+      <ComponentRef Id='MainExecutable' />
+    </Feature>
+
+    <Icon Id="Foobar10.exe" SourceFile="FoobarAppl10.exe" />
+
+  </Product>
+</Wix>
diff --git a/tests/wixl.bats b/tests/wixl.bats
index 7e9a0b0..6c000eb 100644
--- a/tests/wixl.bats
+++ b/tests/wixl.bats
@@ -171,3 +171,11 @@ EOF
   run "$wixl" test.wxs
   [ "$status" -eq 1 ]
 }
+
+@test "wixl - UI ext" {
+  cd wixl
+  run "$wixl" -o out.msi TestUI.wxs --ext ui --extdir "$SRCDIR/data/ext"
+  [ "$status" -eq 0 ]
+  # FIXME: add tons of tests on out.msi
+  test -f out.msi
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]