From a8e31958d7e1b0ef10ea8035abf1e3bf07170eb8 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 12 Jan 2019 16:33:59 -0600 Subject: Add failing test for issues exposed by UIExtension. --- .../WixToolsetTest.CoreIntegration/MsiFixture.cs | 41 ++++++++++++++++++++++ .../DialogsInInstallUISequence/Package.en-us.wxl | 13 +++++++ .../DialogsInInstallUISequence/Package.wxs | 21 +++++++++++ .../PackageComponents.wxs | 38 ++++++++++++++++++++ .../DialogsInInstallUISequence/data/test.txt | 1 + .../WixToolsetTest.CoreIntegration.csproj | 4 +++ 6 files changed, 118 insertions(+) create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt (limited to 'src') diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 76f57676..b5e1ec3d 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs @@ -206,6 +206,47 @@ namespace WixToolsetTest.CoreIntegration } } + [Fact(Skip = "Currently fails")] + public void CanBuildDialogsInInstallUISequence() + { + var folder = TestData.Get(@"TestData\DialogsInInstallUISequence"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "Package.wxs"), + Path.Combine(folder, "PackageComponents.wxs"), + "-loc", Path.Combine(folder, "Package.en-us.wxl"), + "-bindpath", Path.Combine(folder, "data"), + "-intermediateFolder", intermediateFolder, + "-o", Path.Combine(baseFolder, @"bin\test.msi") + }); + + result.AssertSuccess(); + + Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi"))); + Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb"))); + Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\MsiPackage\test.txt"))); + + var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"test.wir")); + var section = intermediate.Sections.Single(); + + var textStyle = section.Tuples.OfType().Single(); + Assert.Equal("Tahoma", textStyle.FaceName); + Assert.Equal(8, textStyle.Size); + + var installUIActions = section.Tuples.OfType() + .Where(t => t.SequenceTable == SequenceTable.InstallUISequence) + .ToList(); + Assert.Equal(10, installUIActions.Count); + } + } + [Fact] public void CanLoadPdbGeneratedByBuild() { diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl new file mode 100644 index 00000000..77d46861 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.en-us.wxl @@ -0,0 +1,13 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + Tahoma + 8 + + diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs new file mode 100644 index 00000000..6da3dcbe --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/Package.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs new file mode 100644 index 00000000..724c46ed --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/PackageComponents.wxs @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + NOT Installed + + + + + + + + + Installed AND PATCH + + + Installed AND PATCH + NOT Installed + + + + + + + + + diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt new file mode 100644 index 00000000..cd0db0e1 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DialogsInInstallUISequence/data/test.txt @@ -0,0 +1 @@ +This is test.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 53c5ceea..7365f140 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -13,6 +13,10 @@ + + + + -- cgit v1.2.3-55-g6feb