aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-02-26 11:24:10 -0800
committerRob Mensching <rob@firegiant.com>2021-02-27 07:47:08 -0800
commit5fd1b7ff82f17d55c8357fe76898a1bdc5953476 (patch)
tree5ec191ebf43009daf9bde6d0c26879b181b9a71b /src/test
parent760fb810ba5ecc3c6ce752a9bfa3755f7b7c0f6a (diff)
downloadwix-5fd1b7ff82f17d55c8357fe76898a1bdc5953476.tar.gz
wix-5fd1b7ff82f17d55c8357fe76898a1bdc5953476.tar.bz2
wix-5fd1b7ff82f17d55c8357fe76898a1bdc5953476.zip
Absorb Dependency.wixext into Core
Partly resolves wixtoolset/issues#5949
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs30
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.en-us.wxl11
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.wxs14
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/PackageComponents.wxs10
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/example.txt1
5 files changed, 66 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs
new file mode 100644
index 00000000..14eb8ff7
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs
@@ -0,0 +1,30 @@
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.CoreIntegration
4{
5 using WixBuildTools.TestSupport;
6 using WixToolset.Core.TestPackage;
7 using Xunit;
8
9 public class DependencyExtensionFixture
10 {
11 [Fact]
12 public void CanBuildUsingProvides()
13 {
14 var folder = TestData.Get(@"TestData\UsingProvides");
15 var build = new Builder(folder, null, new[] { folder });
16
17 var results = build.BuildAndQuery(Build, "WixDependencyProvider");
18 Assert.Equal(new[]
19 {
20 "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t",
21 }, results);
22 }
23
24 private static void Build(string[] args)
25 {
26 var result = WixRunner.Execute(args)
27 .AssertSuccess();
28 }
29 }
30}
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.en-us.wxl b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
8 <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 <String Id="FeatureTitle">MsiPackage</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.wxs
new file mode 100644
index 00000000..07da1215
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/Package.wxs
@@ -0,0 +1,14 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3
4 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
5
6 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
7 <ComponentGroupRef Id="ProductComponents" />
8 </Feature>
9 </Package>
10
11 <Fragment>
12 <Directory Id="INSTALLFOLDER" Name="ProgramFilesFolder:\MsiPackage" />
13 </Fragment>
14</Wix>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/PackageComponents.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/PackageComponents.wxs
new file mode 100644
index 00000000..7e459e9a
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Fragment>
3 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
4 <Component>
5 <File Source="example.txt" />
6 <Provides Key="UsingProvides" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/example.txt b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/example.txt
new file mode 100644
index 00000000..1b4ffe8a
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/UsingProvides/example.txt
@@ -0,0 +1 @@
This is example.txt. \ No newline at end of file