aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs b/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs
new file mode 100644
index 00000000..1193b685
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs
@@ -0,0 +1,44 @@
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 WixToolset.Data.WindowsInstaller;
12 using Xunit;
13
14 public class PreprocessorFixture
15 {
16 [Fact]
17 public void VariableRedefinitionIsAWarning()
18 {
19 var folder = TestData.Get(@"TestData\Variables");
20
21 using (var fs = new DisposableFileSystem())
22 {
23 var baseFolder = fs.GetFolder();
24 var intermediateFolder = Path.Combine(baseFolder, "obj");
25
26 var result = WixRunner.Execute(new[]
27 {
28 "build",
29 Path.Combine(folder, "Package.wxs"),
30 Path.Combine(folder, "PackageComponents.wxs"),
31 "-loc", Path.Combine(folder, "Package.en-us.wxl"),
32 "-bindpath", Path.Combine(folder, "data"),
33 "-intermediateFolder", intermediateFolder,
34 "-o", Path.Combine(baseFolder, @"bin\test.msi")
35 }, out var messages);
36 Assert.Equal(0, result);
37
38 var warnings = messages.Where(message => message.Id == 1118);
39 Assert.Single(warnings);
40 }
41 }
42 }
43}
44