From 9c54d2fce80983bbee5f0f113b5aa30f22bc8a23 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 23 May 2020 21:54:53 +1000 Subject: Add failing test for RegistryKey without Id and child extension element. --- .../BadInputFixture.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs (limited to 'src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs') diff --git a/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs new file mode 100644 index 00000000..8482dcbe --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolsetTest.CoreIntegration +{ + using System; + using System.IO; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using Xunit; + + public class BadInputFixture + { + [Fact(Skip = "Test demonstrates failure")] + public void RegistryKeyWithoutAttributesDoesntCrash() + { + var folder = TestData.Get(@"TestData\BadInput"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "RegistryKey.wxs"), + "-intermediateFolder", intermediateFolder, + "-o", wixlibPath, + }); + + Assert.InRange(result.ExitCode, 2, Int32.MaxValue); + } + } + } +} -- cgit v1.2.3-55-g6feb