aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs
new file mode 100644
index 00000000..88491eac
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs
@@ -0,0 +1,45 @@
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
3namespace WixToolsetTest.CoreIntegration
4{
5 using System.IO;
6 using System.Linq;
7 using WixBuildTools.TestSupport;
8 using WixToolset.Core.TestPackage;
9 using WixToolset.Data;
10 using WixToolset.Data.Tuples;
11 using Xunit;
12
13 public class WixlibQueryFixture
14 {
15 [Fact(Skip = "Test demonstrates failure")]
16 public void DetectOnlyUpgradeProducesReferenceToRemoveExistingProducts()
17 {
18 var folder = TestData.Get(@"TestData\Upgrade");
19
20 using (var fs = new DisposableFileSystem())
21 {
22 var baseFolder = fs.GetFolder();
23 var intermediateFolder = Path.Combine(baseFolder, "obj");
24
25 var result = WixRunner.Execute(new[]
26 {
27 "build",
28 Path.Combine(folder, "DetectOnly.wxs"),
29 "-intermediateFolder", intermediateFolder,
30 "-o", Path.Combine(intermediateFolder, @"test.wixlib"),
31 });
32
33 result.AssertSuccess();
34
35 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wixlib"));
36 var allTuples = intermediate.Sections.SelectMany(s => s.Tuples);
37 var wixSimpleRefTuples = allTuples.OfType<WixSimpleReferenceTuple>();
38 var repRef = wixSimpleRefTuples.Where(t => t.Table == "WixAction" &&
39 t.PrimaryKeys == "InstallExecuteSequence/RemoveExistingProducts")
40 .SingleOrDefault();
41 Assert.NotNull(repRef);
42 }
43 }
44 }
45}