diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 2141e68c..ad24f346 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | |||
@@ -2,8 +2,10 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.CoreIntegration | 3 | namespace WixToolsetTest.CoreIntegration |
4 | { | 4 | { |
5 | using System; | ||
5 | using System.IO; | 6 | using System.IO; |
6 | using System.Linq; | 7 | using System.Linq; |
8 | using Example.Extension; | ||
7 | using WixBuildTools.TestSupport; | 9 | using WixBuildTools.TestSupport; |
8 | using WixToolset.Core.TestPackage; | 10 | using WixToolset.Core.TestPackage; |
9 | using WixToolset.Data; | 11 | using WixToolset.Data; |
@@ -882,5 +884,39 @@ namespace WixToolsetTest.CoreIntegration | |||
882 | Assert.NotEmpty(output.SubStorages); | 884 | Assert.NotEmpty(output.SubStorages); |
883 | } | 885 | } |
884 | } | 886 | } |
887 | |||
888 | [Fact(Skip = "Test demonstrates failure")] | ||
889 | public void FailsBuildAtLinkTimeForMissingEnsureTable() | ||
890 | { | ||
891 | var folder = TestData.Get(@"TestData"); | ||
892 | var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath); | ||
893 | |||
894 | using (var fs = new DisposableFileSystem()) | ||
895 | { | ||
896 | var baseFolder = fs.GetFolder(); | ||
897 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
898 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
899 | |||
900 | var result = WixRunner.Execute(new[] | ||
901 | { | ||
902 | "build", | ||
903 | Path.Combine(folder, "BadEnsureTable", "BadEnsureTable.wxs"), | ||
904 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
905 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
906 | "-ext", extensionPath, | ||
907 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
908 | "-intermediateFolder", intermediateFolder, | ||
909 | "-o", msiPath | ||
910 | }); | ||
911 | Assert.Collection(result.Messages, | ||
912 | first => | ||
913 | { | ||
914 | Assert.Equal(MessageLevel.Error, first.Level); | ||
915 | Assert.Equal("The identifier 'WixCustomTable:TableDefinitionNotExposedByExtension' could not be found. Ensure you have typed the reference correctly and that all the necessary inputs are provided to the linker.", first.ToString()); | ||
916 | }); | ||
917 | |||
918 | Assert.False(File.Exists(msiPath)); | ||
919 | } | ||
920 | } | ||
885 | } | 921 | } |
886 | } | 922 | } |