diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/BindVariablesFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BindVariablesFixture.cs | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BindVariablesFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BindVariablesFixture.cs deleted file mode 100644 index 39e6b4aa..00000000 --- a/src/test/WixToolsetTest.CoreIntegration/BindVariablesFixture.cs +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.CoreIntegration | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.IO; | ||
| 7 | using WixBuildTools.TestSupport; | ||
| 8 | using WixToolset.Core.TestPackage; | ||
| 9 | using Xunit; | ||
| 10 | |||
| 11 | public class BindVariablesFixture | ||
| 12 | { | ||
| 13 | [Fact] | ||
| 14 | public void CanBuildBundleWithPackageBindVariables() | ||
| 15 | { | ||
| 16 | var folder = TestData.Get(@"TestData"); | ||
| 17 | |||
| 18 | using (var fs = new DisposableFileSystem()) | ||
| 19 | { | ||
| 20 | var baseFolder = fs.GetFolder(); | ||
| 21 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 22 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 23 | |||
| 24 | var result = WixRunner.Execute(new[] | ||
| 25 | { | ||
| 26 | "build", | ||
| 27 | Path.Combine(folder, "BundleBindVariables", "CacheIdFromPackageDescription.wxs"), | ||
| 28 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 29 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 30 | "-bindpath", Path.Combine(folder, ".Data"), | ||
| 31 | "-intermediateFolder", intermediateFolder, | ||
| 32 | "-o", exePath, | ||
| 33 | }); | ||
| 34 | |||
| 35 | result.AssertSuccess(); | ||
| 36 | |||
| 37 | Assert.True(File.Exists(exePath)); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | [Fact] | ||
| 42 | public void CanBuildWithDefaultValue() | ||
| 43 | { | ||
| 44 | var folder = TestData.Get(@"TestData", "BindVariables"); | ||
| 45 | |||
| 46 | using (var fs = new DisposableFileSystem()) | ||
| 47 | { | ||
| 48 | var baseFolder = fs.GetFolder(); | ||
| 49 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 50 | var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib"); | ||
| 51 | |||
| 52 | var result = WixRunner.Execute(new[] | ||
| 53 | { | ||
| 54 | "build", | ||
| 55 | Path.Combine(folder, "DefaultedVariable.wxs"), | ||
| 56 | "-bf", | ||
| 57 | "-intermediateFolder", intermediateFolder, | ||
| 58 | "-bindpath", folder, | ||
| 59 | "-o", wixlibPath, | ||
| 60 | }); | ||
| 61 | |||
| 62 | result.AssertSuccess(); | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | [Fact] | ||
| 67 | public void CannotBuildWixlibWithBinariesFromMissingNamedBindPaths() | ||
| 68 | { | ||
| 69 | var folder = TestData.Get(@"TestData", "WixlibWithBinaries"); | ||
| 70 | |||
| 71 | using (var fs = new DisposableFileSystem()) | ||
| 72 | { | ||
| 73 | var baseFolder = fs.GetFolder(); | ||
| 74 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 75 | var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib"); | ||
| 76 | |||
| 77 | var result = WixRunner.Execute(new[] | ||
| 78 | { | ||
| 79 | "build", | ||
| 80 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 81 | "-bf", | ||
| 82 | "-bindpath", Path.Combine(folder, "data"), | ||
| 83 | // Use names that aren't excluded in default .gitignores. | ||
| 84 | "-bindpath", $"AlphaBits={Path.Combine(folder, "data", "alpha")}", | ||
| 85 | "-bindpath", $"PowerBits={Path.Combine(folder, "data", "powerpc")}", | ||
| 86 | "-bindpath", $"{Path.Combine(folder, "data", "alpha")}", | ||
| 87 | "-bindpath", $"{Path.Combine(folder, "data", "powerpc")}", | ||
| 88 | "-intermediateFolder", intermediateFolder, | ||
| 89 | "-o", wixlibPath, | ||
| 90 | }); | ||
| 91 | |||
| 92 | Assert.Equal(103, result.ExitCode); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
