From 704139b787d2016e43b6a87dbfc41555dac8326a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 2 Feb 2019 17:01:09 -0600 Subject: Integrate into latest v4. --- .../DifxAppExtensionFixture.cs | 36 ++++++++++++++++++++ .../TestData/UsingDriver/Package.en-us.wxl | 11 +++++++ .../TestData/UsingDriver/Package.wxs | 21 ++++++++++++ .../TestData/UsingDriver/PackageComponents.wxs | 12 +++++++ .../TestData/UsingDriver/example.txt | 1 + .../WixToolsetTest.DifxApp.csproj | 38 ++++++++++++++++++++++ 6 files changed, 119 insertions(+) create mode 100644 src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt create mode 100644 src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj (limited to 'src/test') diff --git a/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs b/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs new file mode 100644 index 00000000..dbe257fa --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolsetTest.DifxApp +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.DifxApp; + using Xunit; + + public class DifxAppExtensionFixture + { + [Fact] + public void CanBuildUsingDriver() + { + var folder = TestData.Get(@"TestData\UsingDriver"); + var build = new Builder(folder, typeof(DifxAppExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "CustomAction"); + Assert.Equal(new[] + { + "CustomAction:MsiCleanupOnSuccess\t1\tDIFxApp.dll\tCleanupOnSuccess\t0", + "CustomAction:MsiInstallDrivers\t3073\tDIFxAppA.dll\tInstallDriverPackages\t0", + "CustomAction:MsiProcessDrivers\t1\tDIFxApp.dll\tProcessDriverPackages\t0", + "CustomAction:MsiRollbackInstall\t3329\tDIFxAppA.dll\tRollbackInstall\t0", + "CustomAction:MsiUninstallDrivers\t3073\tDIFxAppA.dll\tUninstallDriverPackages\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs new file mode 100644 index 00000000..cdc323ec --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs new file mode 100644 index 00000000..9609771a --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj b/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj new file mode 100644 index 00000000..d2d0de50 --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp2.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb