diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-22 15:53:01 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-22 15:53:01 -0800 |
| commit | ecf3a0cca5a424a91ab98557d963d2535963d582 (patch) | |
| tree | 06355e906e5c404480dc6eac342b9b4d2ec9d122 /src/test/WixToolsetTest.LightIntegration/LightFixture.cs | |
| parent | dc9f4c329e6f55ce7595970463e0caf148096f4b (diff) | |
| download | wix-ecf3a0cca5a424a91ab98557d963d2535963d582.tar.gz wix-ecf3a0cca5a424a91ab98557d963d2535963d582.tar.bz2 wix-ecf3a0cca5a424a91ab98557d963d2535963d582.zip | |
Reintroduce binder extensions and light.exe for binding .wixouts
Diffstat (limited to 'src/test/WixToolsetTest.LightIntegration/LightFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.LightIntegration/LightFixture.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.LightIntegration/LightFixture.cs b/src/test/WixToolsetTest.LightIntegration/LightFixture.cs new file mode 100644 index 00000000..21c10be9 --- /dev/null +++ b/src/test/WixToolsetTest.LightIntegration/LightFixture.cs | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.LightIntegration | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using System.Linq; | ||
| 7 | using WixToolset.Core; | ||
| 8 | using WixToolset.Tools; | ||
| 9 | using WixToolsetTest.LightIntegration.Utility; | ||
| 10 | using Xunit; | ||
| 11 | |||
| 12 | public class LightFixture | ||
| 13 | { | ||
| 14 | [Fact] | ||
| 15 | public void CanBuildFromWixout() | ||
| 16 | { | ||
| 17 | var folder = TestData.Get(@"TestData\Wixout"); | ||
| 18 | |||
| 19 | using (var fs = new DisposableFileSystem()) | ||
| 20 | { | ||
| 21 | var baseFolder = fs.GetFolder(); | ||
| 22 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 23 | |||
| 24 | var program = new Light(); | ||
| 25 | var result = program.Run(new WixToolsetServiceProvider(), null, new[] | ||
| 26 | { | ||
| 27 | Path.Combine(folder, "test.wixout"), | ||
| 28 | "-loc", Path.Combine(folder, "Package.en-us.wxl"), | ||
| 29 | "-b", Path.Combine(folder, "data"), | ||
| 30 | "-intermediateFolder", intermediateFolder, | ||
| 31 | "-o", Path.Combine(baseFolder, @"bin\test.msi") | ||
| 32 | }); | ||
| 33 | |||
| 34 | Assert.Equal(0, result); | ||
| 35 | |||
| 36 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 37 | var builtFiles = Directory.GetFiles(binFolder, "*", SearchOption.AllDirectories); | ||
| 38 | |||
| 39 | Assert.Equal(new[]{ | ||
| 40 | "MsiPackage\\test.txt", | ||
| 41 | "test.msi", | ||
| 42 | "test.wir", | ||
| 43 | "test.wixpdb", | ||
| 44 | }, builtFiles.Select(f => f.Substring(binFolder.Length)).OrderBy(s => s).ToArray()); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
