diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs index d572a91a..aa44ba81 100644 --- a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs +++ b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs | |||
@@ -62,5 +62,48 @@ namespace WixToolsetTest.BuildTasks | |||
62 | Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); | 62 | Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | |||
66 | [Fact(Skip = "Requires deleting wixnative.exe from output folder after build but before running the test.")] | ||
67 | public void ReportsInnerExceptionForUnexpectedExceptions() | ||
68 | { | ||
69 | var folder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage"); | ||
70 | |||
71 | using (var fs = new DisposableFileSystem()) | ||
72 | { | ||
73 | var baseFolder = fs.GetFolder(); | ||
74 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
75 | var pdbPath = Path.Combine(baseFolder, @"bin\testpackage.wixpdb"); | ||
76 | var engine = new FakeBuildEngine(); | ||
77 | |||
78 | var task = new DoIt | ||
79 | { | ||
80 | BuildEngine = engine, | ||
81 | SourceFiles = new[] | ||
82 | { | ||
83 | new TaskItem(Path.Combine(folder, "Package.wxs")), | ||
84 | new TaskItem(Path.Combine(folder, "PackageComponents.wxs")), | ||
85 | }, | ||
86 | LocalizationFiles = new[] | ||
87 | { | ||
88 | new TaskItem(Path.Combine(folder, "Package.en-us.wxl")), | ||
89 | }, | ||
90 | BindInputPaths = new[] | ||
91 | { | ||
92 | new TaskItem(Path.Combine(folder, "data")), | ||
93 | }, | ||
94 | IntermediateDirectory = new TaskItem(intermediateFolder), | ||
95 | OutputFile = new TaskItem(Path.Combine(baseFolder, @"bin\test.msi")), | ||
96 | PdbType = "Full", | ||
97 | PdbFile = new TaskItem(pdbPath), | ||
98 | }; | ||
99 | |||
100 | var result = task.Execute(); | ||
101 | Assert.False(result, $"MSBuild task succeeded unexpectedly. Output:\r\n{engine.Output}"); | ||
102 | |||
103 | Assert.Contains( | ||
104 | "System.PlatformNotSupportedException: Could not find platform specific 'wixnative.exe' ---> System.IO.FileNotFoundException: Could not find internal piece of WiX Toolset from", | ||
105 | engine.Output); | ||
106 | } | ||
107 | } | ||
65 | } | 108 | } |
66 | } | 109 | } |