diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-09-27 16:51:30 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-09-30 13:14:35 +1000 |
commit | a44207c9296c3d5d18f07455f919781b88424c54 (patch) | |
tree | 41e828a58e3bea9c2f80cfac4b73b6d06d1de0db /src/test | |
parent | 6fc21f5c28fec195f8f6eccfed27109a4098d97f (diff) | |
download | wix-a44207c9296c3d5d18f07455f919781b88424c54.tar.gz wix-a44207c9296c3d5d18f07455f919781b88424c54.tar.bz2 wix-a44207c9296c3d5d18f07455f919781b88424c54.zip |
Add failing test for FeatureGroup and parent Features.
Diffstat (limited to 'src/test')
4 files changed, 61 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 82934b9a..4fb136d5 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
@@ -50,5 +50,40 @@ namespace WixToolsetTest.CoreIntegration | |||
50 | }, results); | 50 | }, results); |
51 | } | 51 | } |
52 | } | 52 | } |
53 | |||
54 | [Fact(Skip = "Test demonstrates failure")] | ||
55 | public void PopulatesFeatureTableWithParent() | ||
56 | { | ||
57 | var folder = TestData.Get(@"TestData"); | ||
58 | |||
59 | using (var fs = new DisposableFileSystem()) | ||
60 | { | ||
61 | var baseFolder = fs.GetFolder(); | ||
62 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
63 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
64 | |||
65 | var result = WixRunner.Execute(new[] | ||
66 | { | ||
67 | "build", | ||
68 | Path.Combine(folder, "FeatureGroup", "FeatureGroup.wxs"), | ||
69 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
70 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
71 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
72 | "-intermediateFolder", intermediateFolder, | ||
73 | "-o", msiPath | ||
74 | }); | ||
75 | |||
76 | result.AssertSuccess(); | ||
77 | |||
78 | Assert.True(File.Exists(msiPath)); | ||
79 | var results = Query.QueryDatabase(msiPath, new[] { "Feature" }); | ||
80 | Assert.Equal(new[] | ||
81 | { | ||
82 | "Feature:ChildFeature\tParentFeature\tChildFeatureTitle\t\t2\t1\t\t0", | ||
83 | "Feature:ParentFeature\t\tParentFeatureTitle\t\t2\t1\t\t0", | ||
84 | "Feature:ProductFeature\t\tMsiPackageTitle\t\t2\t1\t\t0", | ||
85 | }, results); | ||
86 | } | ||
87 | } | ||
53 | } | 88 | } |
54 | } | 89 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/FeatureGroup/FeatureGroup.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/FeatureGroup/FeatureGroup.wxs new file mode 100644 index 00000000..be302720 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/FeatureGroup/FeatureGroup.wxs | |||
@@ -0,0 +1,14 @@ | |||
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"></ComponentGroupRef> | ||
6 | </ComponentGroup> | ||
7 | |||
8 | <FeatureGroup Id="ProductFeatureGroup"> | ||
9 | <Feature Id="ParentFeature" Title="ParentFeatureTitle"> | ||
10 | <Feature Id="ChildFeature" Title="ChildFeatureTitle"></Feature> | ||
11 | </Feature> | ||
12 | </FeatureGroup> | ||
13 | </Fragment> | ||
14 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ProductWithComponentGroupRef/MinimalComponentGroup.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ProductWithComponentGroupRef/MinimalComponentGroup.wxs new file mode 100644 index 00000000..f62bbd0e --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ProductWithComponentGroupRef/MinimalComponentGroup.wxs | |||
@@ -0,0 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
3 | <Fragment> | ||
4 | <ComponentGroup Id="MinimalComponentGroup" Directory="INSTALLFOLDER"> | ||
5 | <Component> | ||
6 | <File Source="test.txt" /> | ||
7 | </Component> | ||
8 | </ComponentGroup> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 8e7f1b8f..8a11e531 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
@@ -18,6 +18,8 @@ | |||
18 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 18 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
19 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 19 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
20 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 20 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
21 | <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
22 | <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
21 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> |
22 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
23 | <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |