From 96e966ce322bc630afed6d0ca8c9ec68191c5f83 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 23 May 2020 19:48:43 +1000 Subject: Add failing test for invalid command line switch. --- .../BundleFixture.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index a1896d0d..96a9a013 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs @@ -174,6 +174,35 @@ namespace WixToolsetTest.CoreIntegration } } + [Fact(Skip = "Test demonstrates failure")] + public void CantBuildSingleExeBundleWithInvalidArgument() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var exePath = Path.Combine(baseFolder, @"bin\test.exe"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "SingleExeBundle", "SingleExePackageGroup.wxs"), + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), + "-bindpath", Path.Combine(folder, ".Data"), + "-intermediateFolder", intermediateFolder, + "-o", exePath, + "-nonexistentswitch", "param", + }); + + Assert.NotEqual(0, result.ExitCode); + + Assert.False(File.Exists(exePath)); + } + } + [Fact] public void CanBuildSingleExeRemotePayloadBundle() { -- cgit v1.2.3-55-g6feb