diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-03-08 14:20:23 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-08 15:51:55 -0600 |
| commit | 8e51e27adbcfe1892463463b4e7dc251019f427c (patch) | |
| tree | 74c35e44d3ca113a4bd766472ac5058fbbc18e50 /src/test/WixToolsetTest.CoreIntegration | |
| parent | 6bcf25fe37f0b4dc5f2f43720777e7ab0d26b030 (diff) | |
| download | wix-8e51e27adbcfe1892463463b4e7dc251019f427c.tar.gz wix-8e51e27adbcfe1892463463b4e7dc251019f427c.tar.bz2 wix-8e51e27adbcfe1892463463b4e7dc251019f427c.zip | |
Add failing test for authoring Provides in chain packages.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs | 43 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/TestData/Dependency/ExePackageProvidesBundle.wxs | 10 |
2 files changed, 53 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs index 48270ce4..6437b731 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs | |||
| @@ -12,6 +12,49 @@ namespace WixToolsetTest.CoreIntegration | |||
| 12 | 12 | ||
| 13 | public class DependencyExtensionFixture | 13 | public class DependencyExtensionFixture |
| 14 | { | 14 | { |
| 15 | [Fact(Skip = "Test demonstrates failure")] | ||
| 16 | public void CanBuildBundleUsingExePackageWithProvides() | ||
| 17 | { | ||
| 18 | var folder = TestData.Get(@"TestData"); | ||
| 19 | |||
| 20 | using (var fs = new DisposableFileSystem()) | ||
| 21 | { | ||
| 22 | var baseFolder = fs.GetFolder(); | ||
| 23 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 24 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
| 25 | var bundlePath = Path.Combine(binFolder, "test.exe"); | ||
| 26 | var baFolderPath = Path.Combine(baseFolder, "ba"); | ||
| 27 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
| 28 | |||
| 29 | var result = WixRunner.Execute(new[] | ||
| 30 | { | ||
| 31 | "build", | ||
| 32 | Path.Combine(folder, "Dependency", "ExePackageProvidesBundle.wxs"), | ||
| 33 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 34 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 35 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 36 | "-intermediateFolder", intermediateFolder, | ||
| 37 | "-o", bundlePath, | ||
| 38 | }); | ||
| 39 | |||
| 40 | result.AssertSuccess(); | ||
| 41 | |||
| 42 | Assert.True(File.Exists(bundlePath)); | ||
| 43 | |||
| 44 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
| 45 | extractResult.AssertSuccess(); | ||
| 46 | |||
| 47 | var provides = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Chain/burn:ExePackage/burn:Provides") | ||
| 48 | .Cast<XmlElement>() | ||
| 49 | .Select(e => e.GetTestXml()) | ||
| 50 | .ToArray(); | ||
| 51 | WixAssert.CompareLineByLine(new string[] | ||
| 52 | { | ||
| 53 | "<Provides Key='DependencyTests_ExeA,v1.0' Version='1.0.0.0' />", | ||
| 54 | }, provides); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 15 | [Fact] | 58 | [Fact] |
| 16 | public void CanBuildBundleUsingMsiWithProvides() | 59 | public void CanBuildBundleUsingMsiWithProvides() |
| 17 | { | 60 | { |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/Dependency/ExePackageProvidesBundle.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/Dependency/ExePackageProvidesBundle.wxs new file mode 100644 index 00000000..4d188d3a --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/Dependency/ExePackageProvidesBundle.wxs | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <ExePackage DetectCondition="DetectedSomething" SourceFile="burn.exe"> | ||
| 6 | <Provides Key="DependencyTests_ExeA,v1.0" Version="1.0.0.0" /> | ||
| 7 | </ExePackage> | ||
| 8 | </PackageGroup> | ||
| 9 | </Fragment> | ||
| 10 | </Wix> | ||
