diff options
| author | Bob Arnson <bob@firegiant.com> | 2019-01-16 16:25:46 -0500 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2019-01-16 13:31:40 -0800 |
| commit | 214f53de1c6500aa8dd46e9604c90178807fda1a (patch) | |
| tree | fab56b9447dc618ec0730703f131a23a669af11a /src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | |
| parent | a8e31958d7e1b0ef10ea8035abf1e3bf07170eb8 (diff) | |
| download | wix-214f53de1c6500aa8dd46e9604c90178807fda1a.tar.gz wix-214f53de1c6500aa8dd46e9604c90178807fda1a.tar.bz2 wix-214f53de1c6500aa8dd46e9604c90178807fda1a.zip | |
Fix overridable actions being tagged as duplicates.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs new file mode 100644 index 00000000..fcbff1aa --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | |||
| 2 | // 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. | ||
| 3 | |||
| 4 | namespace WixToolsetTest.CoreIntegration | ||
| 5 | { | ||
| 6 | using System.IO; | ||
| 7 | using System.Linq; | ||
| 8 | using WixBuildTools.TestSupport; | ||
| 9 | using WixToolset.Core.TestPackage; | ||
| 10 | using WixToolset.Data; | ||
| 11 | using WixToolset.Data.Tuples; | ||
| 12 | using WixToolset.Data.WindowsInstaller; | ||
| 13 | using Xunit; | ||
| 14 | |||
| 15 | public class LinkerFixture | ||
| 16 | { | ||
| 17 | [Fact] | ||
| 18 | public void CanBuildWithOverridableActions() | ||
| 19 | { | ||
| 20 | var folder = TestData.Get(@"TestData\OverridableActions"); | ||
| 21 | |||
| 22 | using (var fs = new DisposableFileSystem()) | ||
| 23 | { | ||
| 24 | var baseFolder = fs.GetFolder(); | ||
| 25 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 26 | |||
| 27 | var result = WixRunner.Execute(new[] | ||
| 28 | { | ||
| 29 | "build", | ||
| 30 | Path.Combine(folder, "Package.wxs"), | ||
| 31 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 32 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 33 | "-bindpath", Path.Combine(folder, "data"), | ||
| 34 | "-intermediateFolder", intermediateFolder, | ||
| 35 | "-o", Path.Combine(baseFolder, @"bin\test.msi") | ||
| 36 | }); | ||
| 37 | |||
| 38 | result.AssertSuccess(); | ||
| 39 | |||
| 40 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi"))); | ||
| 41 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); | ||
| 42 | Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\MsiPackage\test.txt"))); | ||
| 43 | |||
| 44 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); | ||
| 45 | var section = intermediate.Sections.Single(); | ||
| 46 | |||
| 47 | var actions = section.Tuples.OfType<WixActionTuple>().Where(wat => wat.Action.StartsWith("Set")).ToList(); | ||
| 48 | Assert.Equal(2, actions.Count); | ||
| 49 | //Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); | ||
| 50 | //Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
