diff options
Diffstat (limited to 'src/test/WixToolsetTest.BuildTasks')
| -rw-r--r-- | src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs | 43 | ||||
| -rw-r--r-- | src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj | 6 |
2 files changed, 0 insertions, 49 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs index 92033766..cd41f16e 100644 --- a/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs +++ b/src/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs | |||
| @@ -62,48 +62,5 @@ 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 WixBuild | ||
| 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 | } | ||
| 108 | } | 65 | } |
| 109 | } | 66 | } |
diff --git a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj b/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj index 22d421de..bfcc10ad 100644 --- a/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj +++ b/src/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj | |||
| @@ -17,12 +17,6 @@ | |||
| 17 | </ItemGroup> | 17 | </ItemGroup> |
| 18 | 18 | ||
| 19 | <ItemGroup> | 19 | <ItemGroup> |
| 20 | <Content Include="..\..\WixToolset.MSBuild\tools\wix.harvest.targets" Link="wix.harvest.targets" CopyToOutputDirectory="PreserveNewest" /> | ||
| 21 | <Content Include="..\..\WixToolset.MSBuild\tools\wix.signing.targets" Link="wix.signing.targets" CopyToOutputDirectory="PreserveNewest" /> | ||
| 22 | <Content Include="..\..\WixToolset.MSBuild\tools\wix.targets" Link="wix.targets" CopyToOutputDirectory="PreserveNewest" /> | ||
| 23 | </ItemGroup> | ||
| 24 | |||
| 25 | <ItemGroup> | ||
| 26 | <ProjectReference Include="..\..\WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" /> | 20 | <ProjectReference Include="..\..\WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" /> |
| 27 | </ItemGroup> | 21 | </ItemGroup> |
| 28 | 22 | ||
