aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-06 11:40:44 -0800
committerRob Mensching <rob@firegiant.com>2017-12-06 11:40:44 -0800
commitb1e662bd480241ea914f0f3d6bd174d9ffd03f5f (patch)
treeaeaaca9fa9054006e5c190b7256bb57f1ff342b6 /src/test
parent5ba862bfa618c89a563d555e8ce7b44a904df406 (diff)
downloadwix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.tar.gz
wix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.tar.bz2
wix-b1e662bd480241ea914f0f3d6bd174d9ffd03f5f.zip
Fix cab creation using explicit Media element
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs14
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/SingleFileCompressed/Package.wxs3
2 files changed, 8 insertions, 9 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs
index 6644fd33..d99f53ec 100644
--- a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs
@@ -40,9 +40,9 @@ namespace WixToolsetTest.CoreIntegration
40 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt"))); 40 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt")));
41 41
42 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir")); 42 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir"));
43 Assert.Single(intermediate.Sections); 43 var section = intermediate.Sections.Single();
44 44
45 var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); 45 var wixFile = section.Tuples.OfType<WixFileTuple>().Single();
46 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); 46 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path);
47 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); 47 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path);
48 } 48 }
@@ -72,13 +72,13 @@ namespace WixToolsetTest.CoreIntegration
72 Assert.Equal(0, result); 72 Assert.Equal(0, result);
73 73
74 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi"))); 74 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi")));
75 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\example.cab")));
75 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); 76 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb")));
76 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt")));
77 77
78 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir")); 78 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir"));
79 Assert.Single(intermediate.Sections); 79 var section = intermediate.Sections.Single();
80 80
81 var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); 81 var wixFile = section.Tuples.OfType<WixFileTuple>().Single();
82 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); 82 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path);
83 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); 83 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path);
84 } 84 }
@@ -110,9 +110,9 @@ namespace WixToolsetTest.CoreIntegration
110 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); 110 Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb")));
111 111
112 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir")); 112 var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir"));
113 Assert.Single(intermediate.Sections); 113 var section = intermediate.Sections.Single();
114 114
115 var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); 115 var wixFile = section.Tuples.OfType<WixFileTuple>().Single();
116 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); 116 Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path);
117 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); 117 Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path);
118 } 118 }
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleFileCompressed/Package.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleFileCompressed/Package.wxs
index 3f47d01d..87db9851 100644
--- a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleFileCompressed/Package.wxs
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleFileCompressed/Package.wxs
@@ -4,8 +4,7 @@
4 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 4 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
5 5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> 6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 <!--<MediaTemplate />--> 7 <Media Id="1" Cabinet="example.cab" />
8 <Media Id="1" />
9 8
10 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> 9 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
11 <ComponentGroupRef Id="ProductComponents" /> 10 <ComponentGroupRef Id="ProductComponents" />