aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-22 17:19:56 -0700
committerRob Mensching <rob@firegiant.com>2021-04-29 19:53:52 -0700
commit8cf0427984a88b0b3ddfb2061e5be721afffe82e (patch)
tree22e2aaf7665d5ab6d3dc2a8ce8f05d73080d1f20 /src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
parent8426095723fb8530a321260473ab543151bf8c98 (diff)
downloadwix-8cf0427984a88b0b3ddfb2061e5be721afffe82e.tar.gz
wix-8cf0427984a88b0b3ddfb2061e5be721afffe82e.tar.bz2
wix-8cf0427984a88b0b3ddfb2061e5be721afffe82e.zip
Move Core into wix
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
deleted file mode 100644
index c5b6c261..00000000
--- a/src/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
+++ /dev/null
@@ -1,63 +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
3namespace WixToolsetTest.CoreIntegration
4{
5 using System.IO;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using WixToolset.Data;
9 using Xunit;
10
11 public class WarningFixture
12 {
13 [Fact]
14 public void SuppressedWarningsWithWarningAsErrorsAreNotErrors()
15 {
16 var folder = TestData.Get(@"TestData\Payload");
17
18 using (var fs = new DisposableFileSystem())
19 {
20 var baseFolder = fs.GetFolder();
21 var intermediateFolder = Path.Combine(baseFolder, "obj");
22 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
23
24 var result = WixRunner.Execute(warningsAsErrors: true, new[]
25 {
26 "build",
27 "-sw1152",
28 Path.Combine(folder, "CanonicalizeName.wxs"),
29 "-intermediateFolder", intermediateFolder,
30 "-o", wixlibPath,
31 });
32
33 result.AssertSuccess();
34 }
35 }
36
37 [Fact]
38 public void WarningsAsErrorsTreatsWarningsAsErrors()
39 {
40 var folder = TestData.Get(@"TestData\Payload");
41
42 using (var fs = new DisposableFileSystem())
43 {
44 var baseFolder = fs.GetFolder();
45 var intermediateFolder = Path.Combine(baseFolder, "obj");
46 var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
47
48 var result = WixRunner.Execute(warningsAsErrors: true, new[]
49 {
50 "build",
51 Path.Combine(folder, "CanonicalizeName.wxs"),
52 "-intermediateFolder", intermediateFolder,
53 "-o", wixlibPath,
54 });
55
56 Assert.Equal((int)WarningMessages.Ids.PathCanonicalized, result.ExitCode);
57
58 var message = Assert.Single(result.Messages);
59 Assert.Equal(MessageLevel.Warning, message.Level); // TODO: is this right?
60 }
61 }
62 }
63}