diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-10-11 14:59:56 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-10-11 15:39:29 +1000 |
| commit | 664ce5ac707905b631f9a752cab0d2dc1b7d6edc (patch) | |
| tree | 466b380fdfa640b5b0d509a898ec1500a34e95b7 /src/test/WixToolsetTest.CoreIntegration | |
| parent | 17c717d302fd8c6ecc89e5611377bafcdd733f43 (diff) | |
| download | wix-664ce5ac707905b631f9a752cab0d2dc1b7d6edc.tar.gz wix-664ce5ac707905b631f9a752cab0d2dc1b7d6edc.tar.bz2 wix-664ce5ac707905b631f9a752cab0d2dc1b7d6edc.zip | |
Add failing test for CustomTable.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
3 files changed, 56 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 724126bb..950ac40c 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -217,6 +217,40 @@ namespace WixToolsetTest.CoreIntegration | |||
| 217 | } | 217 | } |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | [Fact(Skip = "Test demonstrates failure")] | ||
| 221 | public void PopulatesCustomTable1() | ||
| 222 | { | ||
| 223 | var folder = TestData.Get(@"TestData"); | ||
| 224 | |||
| 225 | using (var fs = new DisposableFileSystem()) | ||
| 226 | { | ||
| 227 | var baseFolder = fs.GetFolder(); | ||
| 228 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 229 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 230 | |||
| 231 | var result = WixRunner.Execute(new[] | ||
| 232 | { | ||
| 233 | "build", | ||
| 234 | Path.Combine(folder, "CustomTable", "CustomTable.wxs"), | ||
| 235 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 236 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 237 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 238 | "-intermediateFolder", intermediateFolder, | ||
| 239 | "-o", msiPath | ||
| 240 | }); | ||
| 241 | |||
| 242 | result.AssertSuccess(); | ||
| 243 | |||
| 244 | Assert.True(File.Exists(msiPath)); | ||
| 245 | var results = Query.QueryDatabase(msiPath, new[] { "CustomTable1" }); | ||
| 246 | Assert.Equal(new[] | ||
| 247 | { | ||
| 248 | "CustomTable1:Row1\ttest.txt", | ||
| 249 | "CustomTable1:Row2\ttest.txt", | ||
| 250 | }, results); | ||
| 251 | } | ||
| 252 | } | ||
| 253 | |||
| 220 | [Fact] | 254 | [Fact] |
| 221 | public void PopulatesDirectoryTableWithValidDefaultDir() | 255 | public void PopulatesDirectoryTableWithValidDefaultDir() |
| 222 | { | 256 | { |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs new file mode 100644 index 00000000..649b29b6 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <ComponentGroup Id="ProductComponents"> | ||
| 5 | <ComponentGroupRef Id="MinimalComponentGroup" /> | ||
| 6 | </ComponentGroup> | ||
| 7 | |||
| 8 | <CustomTable Id="CustomTable1"> | ||
| 9 | <Column Id="Column1" Type="string" PrimaryKey="yes" /> | ||
| 10 | <Column Id="Component_" Type="string" Width="72" KeyTable="Component" KeyColumn="1" /> | ||
| 11 | <Row> | ||
| 12 | <Data Column="Column1">Row1</Data> | ||
| 13 | <Data Column="Component_">test.txt</Data> | ||
| 14 | </Row> | ||
| 15 | <Row> | ||
| 16 | <Data Column="Column1">Row2</Data> | ||
| 17 | <Data Column="Component_">test.txt</Data> | ||
| 18 | </Row> | ||
| 19 | </CustomTable> | ||
| 20 | </Fragment> | ||
| 21 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 65034159..b8e7c213 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 19 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 20 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 20 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 21 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> | 21 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 22 | <Content Include="TestData\CustomTable\CustomTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 22 | <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 23 | <Content Include="TestData\DialogsInInstallUISequence\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\DialogsInInstallUISequence\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
| 24 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
