diff options
author | Rob Mensching <rob@firegiant.com> | 2020-05-23 01:57:15 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2020-05-23 02:00:44 -0700 |
commit | c4497aa78b2d85b2613af64311bf282756aff43a (patch) | |
tree | 152fd4c2402b195b9370de94d24022b137aa2415 /src/test | |
parent | f08e7529967fa9870faeee6dfa00f326c65cef1e (diff) | |
download | wix-c4497aa78b2d85b2613af64311bf282756aff43a.tar.gz wix-c4497aa78b2d85b2613af64311bf282756aff43a.tar.bz2 wix-c4497aa78b2d85b2613af64311bf282756aff43a.zip |
Support instance transforms
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 075f7733..69258ae4 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | |||
@@ -790,7 +790,7 @@ namespace WixToolsetTest.CoreIntegration | |||
790 | } | 790 | } |
791 | } | 791 | } |
792 | 792 | ||
793 | [Fact(Skip = "Not implemented yet.")] | 793 | [Fact] |
794 | public void CanBuildInstanceTransform() | 794 | public void CanBuildInstanceTransform() |
795 | { | 795 | { |
796 | var folder = TestData.Get(@"TestData\InstanceTransform"); | 796 | var folder = TestData.Get(@"TestData\InstanceTransform"); |
@@ -813,7 +813,30 @@ namespace WixToolsetTest.CoreIntegration | |||
813 | result.AssertSuccess(); | 813 | result.AssertSuccess(); |
814 | 814 | ||
815 | var output = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"), false); | 815 | var output = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb"), false); |
816 | Assert.NotEmpty(output.SubStorages); | 816 | var substorage = output.SubStorages.Single(); |
817 | Assert.Equal("I1", substorage.Name); | ||
818 | |||
819 | var data = substorage.Data; | ||
820 | Assert.Equal(new[] | ||
821 | { | ||
822 | "_SummaryInformation", | ||
823 | "Property", | ||
824 | "Upgrade" | ||
825 | }, data.Tables.Select(t => t.Name).ToArray()); | ||
826 | |||
827 | Assert.Equal(new[] | ||
828 | { | ||
829 | "INSTANCEPROPERTY\tI1", | ||
830 | "ProductName\tMsiPackage (Instance 1)", | ||
831 | }, JoinRows(data.Tables["Property"])); | ||
832 | |||
833 | Assert.Equal(new[] | ||
834 | { | ||
835 | "{047730A5-30FE-4A62-A520-DA9381B8226A}\t\t1.0.0.0\t1033\t1\t\tWIX_UPGRADE_DETECTED", | ||
836 | "{047730A5-30FE-4A62-A520-DA9381B8226A}\t\t1.0.0.0\t1033\t1\t0\t0", | ||
837 | "{047730A5-30FE-4A62-A520-DA9381B8226A}\t1.0.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", | ||
838 | "{047730A5-30FE-4A62-A520-DA9381B8226A}\t1.0.0.0\t\t1033\t2\t0\t0" | ||
839 | }, JoinRows(data.Tables["Upgrade"])); | ||
817 | } | 840 | } |
818 | } | 841 | } |
819 | 842 | ||
@@ -850,5 +873,15 @@ namespace WixToolsetTest.CoreIntegration | |||
850 | Assert.False(File.Exists(msiPath)); | 873 | Assert.False(File.Exists(msiPath)); |
851 | } | 874 | } |
852 | } | 875 | } |
876 | |||
877 | private static string[] JoinRows(Table table) | ||
878 | { | ||
879 | return table.Rows.Select(r => JoinFields(r.Fields)).ToArray(); | ||
880 | |||
881 | string JoinFields(Field[] fields) | ||
882 | { | ||
883 | return String.Join('\t', fields.Select(f => f.ToString())); | ||
884 | } | ||
885 | } | ||
853 | } | 886 | } |
854 | } | 887 | } |