aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-09-30 11:36:49 +1000
committerSean Hall <r.sean.hall@gmail.com>2019-09-30 13:14:35 +1000
commit4d52ab54b8ea64507ffe94910cbcfdf07d7d93c8 (patch)
tree02fee3d4c7aeaa258ce7edce3210b3914f066ec7 /src/test
parent5baccaff10f10ae135a1de20ce22608c7dafbb11 (diff)
downloadwix-4d52ab54b8ea64507ffe94910cbcfdf07d7d93c8.tar.gz
wix-4d52ab54b8ea64507ffe94910cbcfdf07d7d93c8.tar.bz2
wix-4d52ab54b8ea64507ffe94910cbcfdf07d7d93c8.zip
Add failing test for ReserveCost.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs33
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/ReserveCost/ReserveCost.wxs11
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj1
3 files changed, 45 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
index c3b8d08b..1e934421 100644
--- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
@@ -412,6 +412,39 @@ namespace WixToolsetTest.CoreIntegration
412 } 412 }
413 413
414 [Fact(Skip = "Test demonstrates failure")] 414 [Fact(Skip = "Test demonstrates failure")]
415 public void PopulatesReserveCostTable()
416 {
417 var folder = TestData.Get(@"TestData");
418
419 using (var fs = new DisposableFileSystem())
420 {
421 var baseFolder = fs.GetFolder();
422 var intermediateFolder = Path.Combine(baseFolder, "obj");
423 var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
424
425 var result = WixRunner.Execute(new[]
426 {
427 "build",
428 Path.Combine(folder, "ReserveCost", "ReserveCost.wxs"),
429 Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
430 Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
431 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
432 "-intermediateFolder", intermediateFolder,
433 "-o", msiPath
434 });
435
436 result.AssertSuccess();
437
438 Assert.True(File.Exists(msiPath));
439 var results = Query.QueryDatabase(msiPath, new[] { "ReserveCost" });
440 Assert.Equal(new[]
441 {
442 "ReserveCost:TestCost\tReserveCostComp\tINSTALLFOLDER\t100\t200",
443 }, results);
444 }
445 }
446
447 [Fact(Skip = "Test demonstrates failure")]
415 public void PopulatesUpgradeTableFromManualUpgrade() 448 public void PopulatesUpgradeTableFromManualUpgrade()
416 { 449 {
417 var folder = TestData.Get(@"TestData\ManualUpgrade"); 450 var folder = TestData.Get(@"TestData\ManualUpgrade");
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ReserveCost/ReserveCost.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ReserveCost/ReserveCost.wxs
new file mode 100644
index 00000000..3218295b
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ReserveCost/ReserveCost.wxs
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents">
5 <Component Id="ReserveCostComp" Directory="INSTALLFOLDER" Guid="5B3B3FC1-533D-4C29-BFB3-0E88B51E59D8">
6 <File Source="test.txt" />
7 <ReserveCost Id="TestCost" RunFromSource="200" RunLocal="100"></ReserveCost>
8 </Component>
9 </ComponentGroup>
10 </Fragment>
11</Wix>
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
index 90d1f809..0ae6cd8c 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
@@ -27,6 +27,7 @@
27 <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" /> 27 <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> 28 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> 29 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" /> 31 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> 32 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> 33 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />