aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/test')
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs39
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs3
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs2
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs2
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayFilesInUseDialogConditionBundle.wxs12
5 files changed, 55 insertions, 3 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
index 07d3dacb..576e7c6c 100644
--- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
@@ -56,6 +56,44 @@ namespace WixToolsetTest.BootstrapperApplications
56 } 56 }
57 57
58 [TestMethod] 58 [TestMethod]
59 public void CanBuildUsingDisplayFilesInUseDialogCondition()
60 {
61 using (var fs = new DisposableFileSystem())
62 {
63 var baseFolder = fs.GetFolder();
64 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
65 var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa");
66 var intermediateFolder = Path.Combine(baseFolder, "obj");
67 var baFolderPath = Path.Combine(baseFolder, "ba");
68 var extractFolderPath = Path.Combine(baseFolder, "extract");
69
70 var compileResult = WixRunner.Execute(new[]
71 {
72 "build",
73 Path.Combine(bundleSourceFolder, "DisplayFilesInUseDialogConditionBundle.wxs"),
74 "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"),
75 "-intermediateFolder", intermediateFolder,
76 "-bindpath", Path.Combine(bundleSourceFolder, "data"),
77 "-o", bundleFile,
78 });
79 compileResult.AssertSuccess();
80
81 Assert.IsTrue(File.Exists(bundleFile));
82
83 var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath);
84 extractResult.AssertSuccess();
85
86 var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo");
87 WixAssert.CompareLineByLine(new string[]
88 {
89 "<WixBalPackageInfo PackageId='test.msi' DisplayFilesInUseDialogCondition='1' />",
90 }, balPackageInfos);
91
92 Assert.IsTrue(File.Exists(Path.Combine(baFolderPath, "thm.wxl")));
93 }
94 }
95
96 [TestMethod]
59 public void CanBuildUsingBootstrapperApplicationId() 97 public void CanBuildUsingBootstrapperApplicationId()
60 { 98 {
61 using (var fs = new DisposableFileSystem()) 99 using (var fs = new DisposableFileSystem())
@@ -298,6 +336,7 @@ namespace WixToolsetTest.BootstrapperApplications
298 { 336 {
299 "bal:Condition/@Condition contains the built-in Variable 'WixBundleAction', which is not available when it is evaluated. (Unavailable Variables are: 'WixBundleAction'.). Rewrite the condition to avoid Variables that are never valid during its evaluation.", 337 "bal:Condition/@Condition contains the built-in Variable 'WixBundleAction', which is not available when it is evaluated. (Unavailable Variables are: 'WixBundleAction'.). Rewrite the condition to avoid Variables that are never valid during its evaluation.",
300 "Overridable variable 'TEST1' collides with 'Test1' with Bundle/@CommandLineVariables value 'caseInsensitive'.", 338 "Overridable variable 'TEST1' collides with 'Test1' with Bundle/@CommandLineVariables value 'caseInsensitive'.",
339 "The *Package/@bal:DisplayFilesInUseDialogCondition attribute's value '=' is not a valid bundle condition.",
301 "The *Package/@bal:DisplayInternalUICondition attribute's value '=' is not a valid bundle condition.", 340 "The *Package/@bal:DisplayInternalUICondition attribute's value '=' is not a valid bundle condition.",
302 "The location of the Variable related to the previous error.", 341 "The location of the Variable related to the previous error.",
303 }, messages.ToArray()); 342 }, messages.ToArray());
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs
index 72e31540..7b4d00fc 100644
--- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs
@@ -168,6 +168,7 @@ namespace WixToolsetTest.BootstrapperApplications
168 "WixInternalUIBootstrapperApplication does not support the value of 'force' for Cache on prereq packages. Prereq packages are only cached when they need to be installed.", 168 "WixInternalUIBootstrapperApplication does not support the value of 'force' for Cache on prereq packages. Prereq packages are only cached when they need to be installed.",
169 "WixInternalUIBootstrapperApplication ignores InstallCondition for the primary package so that the MSI UI is always shown.", 169 "WixInternalUIBootstrapperApplication ignores InstallCondition for the primary package so that the MSI UI is always shown.",
170 "WixInternalUIBootstrapperApplication ignores DisplayInternalUICondition for the primary package so that the MSI UI is always shown.", 170 "WixInternalUIBootstrapperApplication ignores DisplayInternalUICondition for the primary package so that the MSI UI is always shown.",
171 "WixInternalUIBootstrapperApplication ignores DisplayFilesInUseDialogCondition for the primary package so that the MSI UI is always shown.",
171 "When using WixInternalUIBootstrapperApplication, all prereq packages should be before the primary package in the chain. The prereq packages are always installed before the primary package.", 172 "When using WixInternalUIBootstrapperApplication, all prereq packages should be before the primary package in the chain. The prereq packages are always installed before the primary package.",
172 }, compileResult.Messages.Select(m => m.ToString()).ToArray()); 173 }, compileResult.Messages.Select(m => m.ToString()).ToArray());
173 174
@@ -181,7 +182,7 @@ namespace WixToolsetTest.BootstrapperApplications
181 var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); 182 var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo");
182 WixAssert.CompareLineByLine(new string[] 183 WixAssert.CompareLineByLine(new string[]
183 { 184 {
184 "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='DISPLAYTEST' PrimaryPackageType='default' />", 185 "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='DISPLAYTEST' DisplayFilesInUseDialogCondition='DISPLAYTEST' PrimaryPackageType='default' />",
185 }, balPackageInfos); 186 }, balPackageInfos);
186 187
187 var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); 188 var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation");
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs
index 67dfc589..33b2d64c 100644
--- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs
@@ -9,7 +9,7 @@
9 <Variable Name="TEST1" bal:Overridable="yes" /> 9 <Variable Name="TEST1" bal:Overridable="yes" />
10 <Chain> 10 <Chain>
11 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" /> 11 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" />
12 <MsiPackage SourceFile="test.msi" bal:DisplayInternalUICondition="!(loc.NonsensePlanCondition)" /> 12 <MsiPackage SourceFile="test.msi" bal:DisplayInternalUICondition="!(loc.NonsensePlanCondition)" bal:DisplayFilesInUseDialogCondition="!(loc.NonsensePlanCondition)" />
13 </Chain> 13 </Chain>
14 <bal:Condition Condition="!(loc.NonsenseDetectCondition)" Message="Unsupported" /> 14 <bal:Condition Condition="!(loc.NonsenseDetectCondition)" Message="Unsupported" />
15 </Bundle> 15 </Bundle>
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs
index 2cf9787d..9c9aa0f8 100644
--- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs
@@ -6,7 +6,7 @@
6 <bal:WixInternalUIBootstrapperApplication /> 6 <bal:WixInternalUIBootstrapperApplication />
7 </BootstrapperApplication> 7 </BootstrapperApplication>
8 <Chain> 8 <Chain>
9 <MsiPackage SourceFile="test.msi" InstallCondition="INSTALLTEST" bal:DisplayInternalUICondition="DISPLAYTEST" /> 9 <MsiPackage SourceFile="test.msi" InstallCondition="INSTALLTEST" bal:DisplayInternalUICondition="DISPLAYTEST" bal:DisplayFilesInUseDialogCondition="DISPLAYTEST" />
10 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" Cache="force" /> 10 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" Cache="force" />
11 </Chain> 11 </Chain>
12 </Bundle> 12 </Bundle>
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayFilesInUseDialogConditionBundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayFilesInUseDialogConditionBundle.wxs
new file mode 100644
index 00000000..1041eb39
--- /dev/null
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayFilesInUseDialogConditionBundle.wxs
@@ -0,0 +1,12 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 <BootstrapperApplication>
6 <bal:WixStandardBootstrapperApplication LicenseUrl="http://wixtoolset.org/about/license/" Theme="hyperlinkLicense" />
7 </BootstrapperApplication>
8 <Chain>
9 <MsiPackage SourceFile="test.msi" bal:DisplayFilesInUseDialogCondition="1" />
10 </Chain>
11 </Bundle>
12</Wix>