[msitools] tests: add SampleUser



commit fdb03a1bb1794a9e90223274234788882757d4cb
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Thu Jul 11 19:13:26 2013 +0200

    tests: add SampleUser

 tests/data/wixl/SampleUser.wxs |   59 ++++++++++++++++++++++++++++++++++++++++
 tests/wixl.at                  |    8 +++++
 2 files changed, 67 insertions(+), 0 deletions(-)
---
diff --git a/tests/data/wixl/SampleUser.wxs b/tests/data/wixl/SampleUser.wxs
new file mode 100644
index 0000000..5f82bcf
--- /dev/null
+++ b/tests/data/wixl/SampleUser.wxs
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='windows-1252'?>
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+
+  <?define VERSION="0.0.0.0"?>
+
+  <Product
+    Id="*"
+    Name="Sample App"
+    Language="1033"
+    Version="$(var.VERSION)"
+    Manufacturer="Example"
+    UpgradeCode="44a869b4-5dd4-44b0-938b-399f41611658"
+  >
+    <Package
+      Description="Sample App"
+      Manufacturer="Example"
+      InstallerVersion="200"
+      Compressed="yes"
+      InstallScope="perUser"
+    />
+
+    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
+    <MediaTemplate EmbedCab="yes" />
+
+    <Icon Id="Icon.exe" SourceFile="FoobarAppl10.exe" />
+    <Property Id="ARPPRODUCTICON" Value="Icon.exe" />
+    <Property Id="ARPHELPLINK" Value="http://www.example.com/"; />
+
+    <Feature Id="ProductFeature" Title="SampleApp" Level="1">
+      <ComponentGroupRef Id="ProductComponents" />
+    </Feature>
+  </Product>
+
+  <Fragment>
+    <Directory Id="TARGETDIR" Name="SourceDir">
+      <Directory Id="LocalAppDataFolder">
+        <Directory Id="INSTALLFOLDER" Name="SampleApp" />
+      </Directory>
+    </Directory>
+  </Fragment>
+
+  <Fragment>
+    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
+      <Component Id="ProductComponent" Guid="262eca3a-9ab0-4706-ab39-55c89819506a">
+
+        <RegistryKey Root="HKCU" Key="Software\Example\SampleApp">
+          <RegistryValue Name="Version" Value="[ProductVersion]" Type="string" KeyPath="yes" />
+        </RegistryKey>
+
+        <CreateFolder />
+        <RemoveFolder Id="RemoveAppRootDirectory" On="uninstall" />
+
+        <File Id="SampleApp.exe" Source="FoobarAppl10.exe"/>
+
+      </Component>
+    </ComponentGroup>
+  </Fragment>
+
+</Wix>
diff --git a/tests/wixl.at b/tests/wixl.at
index c90ff1b..ccdb834 100644
--- a/tests/wixl.at
+++ b/tests/wixl.at
@@ -28,6 +28,14 @@ AT_CHECK_WIXL([-o out.msi SampleFirst.wxs], [0], [ignore], [ignore])
 AT_CHECK([test -f out.msi], [0])
 AT_CLEANUP
 
+AT_SETUP([SampleUser])
+AT_WIXLDATA([SampleUser.wxs])
+AT_WIXLDATA([FoobarAppl10.exe])
+AT_CHECK_WIXL([-o out.msi SampleUser.wxs], [0], [ignore], [ignore])
+# FIXME: add tons of tests on out.msi
+AT_CHECK([test -f out.msi], [0])
+AT_CLEANUP
+
 AT_SETUP([Stable component GUIDs])
 AT_WIXLDATA([ComponentGUID.wxs])
 AT_WIXLDATA([FoobarAppl10.exe])


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