diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs index 1ce445e8..1b7a18cf 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |||
| @@ -209,6 +209,42 @@ namespace WixToolsetTest.CoreIntegration | |||
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | [Fact] | ||
| 213 | public void CanBuildManualUpgrade() | ||
| 214 | { | ||
| 215 | var folder = TestData.Get(@"TestData\ManualUpgrade"); | ||
| 216 | |||
| 217 | using (var fs = new DisposableFileSystem()) | ||
| 218 | { | ||
| 219 | var intermediateFolder = fs.GetFolder(); | ||
| 220 | |||
| 221 | var program = new Program(); | ||
| 222 | var result = program.Run(new WixToolsetServiceProvider(), new[] | ||
| 223 | { | ||
| 224 | "build", | ||
| 225 | Path.Combine(folder, "Package.wxs"), | ||
| 226 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 227 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 228 | "-bindpath", Path.Combine(folder, "data"), | ||
| 229 | "-intermediateFolder", intermediateFolder, | ||
| 230 | "-o", Path.Combine(intermediateFolder, @"bin\test.msi") | ||
| 231 | }); | ||
| 232 | |||
| 233 | Assert.Equal(0, result); | ||
| 234 | |||
| 235 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi"))); | ||
| 236 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); | ||
| 237 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt"))); | ||
| 238 | |||
| 239 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir")); | ||
| 240 | var section = intermediate.Sections.Single(); | ||
| 241 | |||
| 242 | var wixFile = section.Tuples.OfType<WixFileTuple>().Single(); | ||
| 243 | Assert.Equal(Path.Combine(folder, @"data\test.txt"), wixFile[WixFileTupleFields.Source].AsPath().Path); | ||
| 244 | Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 245 | } | ||
| 246 | } | ||
| 247 | |||
| 212 | [Fact(Skip = "Not implemented yet.")] | 248 | [Fact(Skip = "Not implemented yet.")] |
| 213 | public void CanBuildInstanceTransform() | 249 | public void CanBuildInstanceTransform() |
| 214 | { | 250 | { |
