diff options
| author | Bob Arnson <bob@firegiant.com> | 2018-09-27 20:10:30 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2018-09-27 21:41:19 -0400 |
| commit | aa33b92c7a2e6b699a11532056485143b0edf4a3 (patch) | |
| tree | 06483f2a90d97ac164d427c57f0cfcd237fdc2c3 /src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs | |
| parent | aed25de217d676bef1559290457b54444714e194 (diff) | |
| download | wix-aa33b92c7a2e6b699a11532056485143b0edf4a3.tar.gz wix-aa33b92c7a2e6b699a11532056485143b0edf4a3.tar.bz2 wix-aa33b92c7a2e6b699a11532056485143b0edf4a3.zip | |
Report preprocessor exceptions as errors. Fixes wixtoolset/issues#5881.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs b/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs index 9c60c902..ebc713ed 100644 --- a/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/PreprocessorFixture.cs | |||
| @@ -63,6 +63,32 @@ namespace WixToolsetTest.CoreIntegration | |||
| 63 | Assert.Equal(0, result); | 63 | Assert.Equal(0, result); |
| 64 | } | 64 | } |
| 65 | } | 65 | } |
| 66 | |||
| 67 | [Fact] | ||
| 68 | public void NonterminatedPreprocessorInstructionShowsSourceLineNumber() | ||
| 69 | { | ||
| 70 | var folder = TestData.Get(@"TestData\BadIf"); | ||
| 71 | |||
| 72 | using (var fs = new DisposableFileSystem()) | ||
| 73 | { | ||
| 74 | var baseFolder = fs.GetFolder(); | ||
| 75 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 76 | |||
| 77 | var result = WixRunner.Execute(new[] | ||
| 78 | { | ||
| 79 | "build", | ||
| 80 | Path.Combine(folder, "Package.wxs"), | ||
| 81 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 82 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 83 | "-bindpath", Path.Combine(folder, "data"), | ||
| 84 | "-intermediateFolder", intermediateFolder, | ||
| 85 | "-o", Path.Combine(baseFolder, @"bin\test.msi") | ||
| 86 | }, out var messages); | ||
| 87 | |||
| 88 | Assert.Equal(147, result); | ||
| 89 | Assert.StartsWith("Found a <?if?>", messages.Single().ToString()); | ||
| 90 | } | ||
| 91 | } | ||
| 66 | } | 92 | } |
| 67 | } | 93 | } |
| 68 | 94 | ||
