diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2017-12-04 18:33:11 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@joyofsetup.com> | 2017-12-04 18:33:11 -0500 |
| commit | e53afb01c6e01bb9e6521fa77d31e575abc73f9c (patch) | |
| tree | c26b5b22e1cfee21cb29e904f231b95dcf0dd45c /src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |
| parent | 95f2f4425b900374c7d7b583ae810b096121b3c4 (diff) | |
| download | wix-e53afb01c6e01bb9e6521fa77d31e575abc73f9c.tar.gz wix-e53afb01c6e01bb9e6521fa77d31e575abc73f9c.tar.bz2 wix-e53afb01c6e01bb9e6521fa77d31e575abc73f9c.zip | |
Add CanBuildSingleFileCompressed test (failing variety).
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 e9e5c62f..6644fd33 100644 --- a/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/ProgramFixture.cs | |||
| @@ -49,6 +49,42 @@ namespace WixToolsetTest.CoreIntegration | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | [Fact] | 51 | [Fact] |
| 52 | public void CanBuildSingleFileCompressed() | ||
| 53 | { | ||
| 54 | var folder = TestData.Get(@"TestData\SingleFileCompressed"); | ||
| 55 | |||
| 56 | using (var fs = new DisposableFileSystem()) | ||
| 57 | { | ||
| 58 | var intermediateFolder = fs.GetFolder(); | ||
| 59 | |||
| 60 | var program = new Program(); | ||
| 61 | var result = program.Run(new WixToolsetServiceProvider(), new[] | ||
| 62 | { | ||
| 63 | "build", | ||
| 64 | Path.Combine(folder, "Package.wxs"), | ||
| 65 | Path.Combine(folder, "PackageComponents.wxs"), | ||
| 66 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 67 | "-bindpath", Path.Combine(folder, "data"), | ||
| 68 | "-intermediateFolder", intermediateFolder, | ||
| 69 | "-o", Path.Combine(intermediateFolder, @"bin\test.msi") | ||
| 70 | }); | ||
| 71 | |||
| 72 | Assert.Equal(0, result); | ||
| 73 | |||
| 74 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi"))); | ||
| 75 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); | ||
| 76 | Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt"))); | ||
| 77 | |||
| 78 | var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wir")); | ||
| 79 | Assert.Single(intermediate.Sections); | ||
| 80 | |||
| 81 | var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single(); | ||
| 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); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 87 | [Fact] | ||
| 52 | public void CanBuildSimpleModule() | 88 | public void CanBuildSimpleModule() |
| 53 | { | 89 | { |
| 54 | var folder = TestData.Get(@"TestData\SimpleModule"); | 90 | var folder = TestData.Get(@"TestData\SimpleModule"); |
