diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-05-11 17:09:47 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-05-11 17:17:45 -0400 |
| commit | bac3d761d99fb7ae1012f3591baee2dbec115b28 (patch) | |
| tree | 852f30be8ba4b0bc4a2cbd3dfd703149f4d00d3d /src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | |
| parent | 93d3a9e1f9cdc05456a612e238a83738cfd1750f (diff) | |
| download | wix-bac3d761d99fb7ae1012f3591baee2dbec115b28.tar.gz wix-bac3d761d99fb7ae1012f3591baee2dbec115b28.tar.bz2 wix-bac3d761d99fb7ae1012f3591baee2dbec115b28.zip | |
Fix named bind paths.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs index f63d1144..63771248 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs | |||
| @@ -53,6 +53,42 @@ namespace WixToolsetTest.CoreIntegration | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | [Fact] | 55 | [Fact] |
| 56 | public void CanBuildWixlibWithBinariesFromNamedBindPaths() | ||
| 57 | { | ||
| 58 | var folder = TestData.Get(@"TestData\WixlibWithBinaries"); | ||
| 59 | |||
| 60 | using (var fs = new DisposableFileSystem()) | ||
| 61 | { | ||
| 62 | var baseFolder = fs.GetFolder(); | ||
| 63 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 64 | var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib"); | ||
| 65 | |||
| 66 | var result = WixRunner.Execute(new[] | ||
| 67 | { | ||
| 68 | "build", | ||
| 69 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 70 | "-bf", | ||
| 71 | "-bindpath", Path.Combine(folder, "data"), | ||
| 72 | // Use names that aren't excluded in default .gitignores. | ||
| 73 | "-bindpath", $"AlphaBits={Path.Combine(folder, "data", "alpha")}", | ||
| 74 | "-bindpath", $"MipsBits={Path.Combine(folder, "data", "mips")}", | ||
| 75 | "-bindpath", $"PowerBits={Path.Combine(folder, "data", "powerpc")}", | ||
| 76 | "-intermediateFolder", intermediateFolder, | ||
| 77 | "-o", wixlibPath, | ||
| 78 | }); | ||
| 79 | |||
| 80 | result.AssertSuccess(); | ||
| 81 | |||
| 82 | var wixlib = Intermediate.Load(wixlibPath); | ||
| 83 | var binaryTuples = wixlib.Sections.SelectMany(s => s.Tuples).OfType<BinaryTuple>().ToList(); | ||
| 84 | Assert.Equal(3, binaryTuples.Count); | ||
| 85 | Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll")); | ||
| 86 | Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-1")); | ||
| 87 | Assert.Single(binaryTuples.Where(t => t.Data.Path == "wix-ir/foo.dll-2")); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | [Fact] | ||
| 56 | public void CanBuildSingleFileUsingWixlib() | 92 | public void CanBuildSingleFileUsingWixlib() |
| 57 | { | 93 | { |
| 58 | var folder = TestData.Get(@"TestData\SingleFile"); | 94 | var folder = TestData.Get(@"TestData\SingleFile"); |
