diff options
Diffstat (limited to 'src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs')
-rw-r--r-- | src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs b/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs new file mode 100644 index 00000000..708ae658 --- /dev/null +++ b/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs | |||
@@ -0,0 +1,38 @@ | |||
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.Dependency | ||
4 | { | ||
5 | using System.Linq; | ||
6 | using System.Text.RegularExpressions; | ||
7 | using WixBuildTools.TestSupport; | ||
8 | using WixToolset.Core.TestPackage; | ||
9 | using WixToolset.Dependency; | ||
10 | using Xunit; | ||
11 | |||
12 | public class DependencyExtensionFixture | ||
13 | { | ||
14 | [Fact] | ||
15 | public void CanBuildUsingProvides() | ||
16 | { | ||
17 | var folder = TestData.Get(@"TestData\UsingProvides"); | ||
18 | var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder }); | ||
19 | |||
20 | var results = build.BuildAndQuery(Build, "CustomAction", "WixDependencyProvider") | ||
21 | .Select(r => Regex.Replace(r, "{[^}]*}", "{*}")) | ||
22 | .ToArray(); | ||
23 | WixAssert.CompareLineByLine(new[] | ||
24 | { | ||
25 | "CustomAction:Wix4DependencyCheck_X86\t1\tDependencyCA_X86\tWixDependencyCheck\t", | ||
26 | "CustomAction:Wix4DependencyRequire_X86\t1\tDependencyCA_X86\tWixDependencyRequire\t", | ||
27 | "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", | ||
28 | "WixDependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t", | ||
29 | }, results); | ||
30 | } | ||
31 | |||
32 | private static void Build(string[] args) | ||
33 | { | ||
34 | var result = WixRunner.Execute(args) | ||
35 | .AssertSuccess(); | ||
36 | } | ||
37 | } | ||
38 | } | ||