aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
diff options
context:
space:
mode:
authorAndrij Abyzov <aabyzov@slb.com>2024-06-20 11:46:16 +0200
committerRob Mensching <rob@firegiant.com>2024-12-26 12:56:05 -0800
commit95701ccca7e32aba135e497bc5887431607a4292 (patch)
treea6c4723ed91475dc0023dabfee0e9c879813cec3 /src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
parent1f11d0b34d1aea5d27a4e32adcc275f39287d8b6 (diff)
downloadwix-95701ccca7e32aba135e497bc5887431607a4292.tar.gz
wix-95701ccca7e32aba135e497bc5887431607a4292.tar.bz2
wix-95701ccca7e32aba135e497bc5887431607a4292.zip
Use ExePayloadRef for PrimaryPayloadId and SecondaryPayloadId
Fixes 8673
Diffstat (limited to 'src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs')
-rw-r--r--src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs44
1 files changed, 42 insertions, 2 deletions
diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
index a9460008..2e21ef90 100644
--- a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
+++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs
@@ -3,10 +3,9 @@
3namespace WixToolsetTest.BootstrapperApplications 3namespace WixToolsetTest.BootstrapperApplications
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic;
6 using System.IO; 7 using System.IO;
7 using System.Linq; 8 using System.Linq;
8 using System.Xml;
9 using WixToolset.BootstrapperApplications;
10 using WixInternal.Core.TestPackage; 9 using WixInternal.Core.TestPackage;
11 using WixInternal.TestSupport; 10 using WixInternal.TestSupport;
12 using Xunit; 11 using Xunit;
@@ -52,6 +51,47 @@ namespace WixToolsetTest.BootstrapperApplications
52 } 51 }
53 52
54 [Fact] 53 [Fact]
54 public void CanBuildUsingBootstrapperApplicationId()
55 {
56 using (var fs = new DisposableFileSystem())
57 {
58 var baseFolder = fs.GetFolder();
59 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
60 var bundleSourceFolder = TestData.Get("TestData", "WixStdBa");
61 var intermediateFolder = Path.Combine(baseFolder, "obj");
62 var baFolderPath = Path.Combine(baseFolder, "ba");
63 var extractFolderPath = Path.Combine(baseFolder, "extract");
64
65 var compileResult = WixRunner.Execute(new[]
66 {
67 "build",
68 Path.Combine(bundleSourceFolder, "BootstrapperApplicationId.wxs"),
69 "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"),
70 "-intermediateFolder", intermediateFolder,
71 "-bindpath", Path.Combine(bundleSourceFolder, "data"),
72 "-o", bundleFile,
73 });
74 compileResult.AssertSuccess();
75
76 Assert.True(File.Exists(bundleFile));
77
78 var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath);
79 extractResult.AssertSuccess();
80
81 var ignoreAttributesByElementName = new Dictionary<string, List<string>>
82 {
83 { "Payload", new List<string> { "SourcePath" } },
84 };
85
86 var wixStdBaPayloadInfo = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:UX/burn:Payload[@FilePath='wixstdba.exe']", ignoreAttributesByElementName);
87 WixAssert.CompareLineByLine(new string[]
88 {
89 $@"<Payload Id='WixStandardBootstrapperApplication_X86' FilePath='wixstdba.exe' SourcePath='*' />"
90 }, wixStdBaPayloadInfo);
91 }
92 }
93
94 [Fact]
55 public void CanBuildUsingOverridable() 95 public void CanBuildUsingOverridable()
56 { 96 {
57 using (var fs = new DisposableFileSystem()) 97 using (var fs = new DisposableFileSystem())