aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.LightIntegration/LightFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.LightIntegration/LightFixture.cs')
-rw-r--r--src/test/WixToolsetTest.LightIntegration/LightFixture.cs48
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
3namespace 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}