diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-02 20:05:54 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-03 15:49:32 -0600 |
commit | df40c2722e4a41e01cf326353e2583ae82ccc9a4 (patch) | |
tree | 277e64d517a33a2eeaf4fd94ee457c3d48c2d49a /src/test | |
parent | b673734cce44dd28c1d4d1810da3069324466166 (diff) | |
download | wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.tar.gz wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.tar.bz2 wix-df40c2722e4a41e01cf326353e2583ae82ccc9a4.zip |
Fix TryGetNextNonSwitchArgumentOrError.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs | 44 | ||||
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | 29 |
2 files changed, 44 insertions, 29 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs index 02422cf7..874151e4 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BadInputFixture.cs | |||
@@ -6,11 +6,55 @@ namespace WixToolsetTest.CoreIntegration | |||
6 | using System.IO; | 6 | using System.IO; |
7 | using WixBuildTools.TestSupport; | 7 | using WixBuildTools.TestSupport; |
8 | using WixToolset.Core.TestPackage; | 8 | using WixToolset.Core.TestPackage; |
9 | using WixToolset.Data; | ||
9 | using Xunit; | 10 | using Xunit; |
10 | 11 | ||
11 | public class BadInputFixture | 12 | public class BadInputFixture |
12 | { | 13 | { |
13 | [Fact] | 14 | [Fact] |
15 | public void SwitchIsNotConsideredAnArgument() | ||
16 | { | ||
17 | var result = WixRunner.Execute(new[] | ||
18 | { | ||
19 | "build", | ||
20 | "-bindpath", "-thisisaswitchnotanarg", | ||
21 | }); | ||
22 | |||
23 | Assert.Single(result.Messages, m => m.Id == (int)ErrorMessages.Ids.ExpectedArgument); | ||
24 | // TODO: when CantBuildSingleExeBundleWithInvalidArgument is fixed, uncomment: | ||
25 | //Assert.Equal((int)ErrorMessages.Ids.ExpectedArgument, result.ExitCode); | ||
26 | } | ||
27 | |||
28 | [Fact(Skip = "Test demonstrates failure")] | ||
29 | public void CantBuildSingleExeBundleWithInvalidArgument() | ||
30 | { | ||
31 | var folder = TestData.Get(@"TestData"); | ||
32 | |||
33 | using (var fs = new DisposableFileSystem()) | ||
34 | { | ||
35 | var baseFolder = fs.GetFolder(); | ||
36 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
37 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
38 | |||
39 | var result = WixRunner.Execute(new[] | ||
40 | { | ||
41 | "build", | ||
42 | Path.Combine(folder, "SingleExeBundle", "SingleExePackageGroup.wxs"), | ||
43 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
44 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
45 | "-bindpath", Path.Combine(folder, ".Data"), | ||
46 | "-intermediateFolder", intermediateFolder, | ||
47 | "-o", exePath, | ||
48 | "-nonexistentswitch", "param", | ||
49 | }); | ||
50 | |||
51 | Assert.NotEqual(0, result.ExitCode); | ||
52 | |||
53 | Assert.False(File.Exists(exePath)); | ||
54 | } | ||
55 | } | ||
56 | |||
57 | [Fact] | ||
14 | public void RegistryKeyWithoutAttributesDoesntCrash() | 58 | public void RegistryKeyWithoutAttributesDoesntCrash() |
15 | { | 59 | { |
16 | var folder = TestData.Get(@"TestData\BadInput"); | 60 | var folder = TestData.Get(@"TestData\BadInput"); |
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 1e3f1e24..fae2ff4c 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
@@ -189,35 +189,6 @@ namespace WixToolsetTest.CoreIntegration | |||
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | [Fact(Skip = "Test demonstrates failure")] | ||
193 | public void CantBuildSingleExeBundleWithInvalidArgument() | ||
194 | { | ||
195 | var folder = TestData.Get(@"TestData"); | ||
196 | |||
197 | using (var fs = new DisposableFileSystem()) | ||
198 | { | ||
199 | var baseFolder = fs.GetFolder(); | ||
200 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
201 | var exePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
202 | |||
203 | var result = WixRunner.Execute(new[] | ||
204 | { | ||
205 | "build", | ||
206 | Path.Combine(folder, "SingleExeBundle", "SingleExePackageGroup.wxs"), | ||
207 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
208 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
209 | "-bindpath", Path.Combine(folder, ".Data"), | ||
210 | "-intermediateFolder", intermediateFolder, | ||
211 | "-o", exePath, | ||
212 | "-nonexistentswitch", "param", | ||
213 | }); | ||
214 | |||
215 | Assert.NotEqual(0, result.ExitCode); | ||
216 | |||
217 | Assert.False(File.Exists(exePath)); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | [Fact] | 192 | [Fact] |
222 | public void CanBuildSingleExeRemotePayloadBundle() | 193 | public void CanBuildSingleExeRemotePayloadBundle() |
223 | { | 194 | { |