diff options
Diffstat (limited to 'src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs')
-rw-r--r-- | src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs b/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs index c6e260be..f1874743 100644 --- a/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs +++ b/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs | |||
@@ -14,6 +14,43 @@ namespace WixToolsetTest.BuildTasks | |||
14 | private static readonly string WixTargetsPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(DoIt).Assembly.CodeBase).AbsolutePath), "wix.targets"); | 14 | private static readonly string WixTargetsPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(DoIt).Assembly.CodeBase).AbsolutePath), "wix.targets"); |
15 | 15 | ||
16 | [Fact] | 16 | [Fact] |
17 | public void CanBuildSimpleBundle() | ||
18 | { | ||
19 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj"); | ||
20 | |||
21 | using (var fs = new DisposableFileSystem()) | ||
22 | { | ||
23 | var baseFolder = fs.GetFolder(); | ||
24 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
25 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
26 | |||
27 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
28 | { | ||
29 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
30 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
31 | $"-p:OutputPath={binFolder}" | ||
32 | }); | ||
33 | result.AssertSuccess(); | ||
34 | |||
35 | var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x86")); | ||
36 | Assert.Single(platformSwitches); | ||
37 | |||
38 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
39 | Assert.Empty(warnings); | ||
40 | |||
41 | var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | ||
42 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
43 | .OrderBy(s => s) | ||
44 | .ToArray(); | ||
45 | Assert.Equal(new[] | ||
46 | { | ||
47 | //@"bin\SimpleBundle.exe", | ||
48 | @"bin\SimpleBundle.wixpdb", | ||
49 | }, paths); | ||
50 | } | ||
51 | } | ||
52 | |||
53 | [Fact] | ||
17 | public void CanBuildSimpleMsiPackage() | 54 | public void CanBuildSimpleMsiPackage() |
18 | { | 55 | { |
19 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | 56 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); |