diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2020-03-05 19:48:12 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-03-09 12:16:09 -0400 |
| commit | e9d10933bedb8215ec50ca85db272d6647426b31 (patch) | |
| tree | 262cbaf190de5d5461941c79923bef8cf4cf7ad1 /src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |
| parent | 7533ca33de2b8125e9f9ecb3b28a247acca85f83 (diff) | |
| download | wix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.gz wix-e9d10933bedb8215ec50ca85db272d6647426b31.tar.bz2 wix-e9d10933bedb8215ec50ca85db272d6647426b31.zip | |
Version extension ids.
Partial fix for wixtoolset/issues#5933.
Diffstat (limited to 'src/test/WixToolsetTest.Util/UtilExtensionFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | 127 |
1 files changed, 122 insertions, 5 deletions
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs index f2f06af8..750098d6 100644 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
| @@ -19,11 +19,118 @@ namespace WixToolsetTest.Util | |||
| 19 | var folder = TestData.Get(@"TestData\UsingFileShare"); | 19 | var folder = TestData.Get(@"TestData\UsingFileShare"); |
| 20 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | 20 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); |
| 21 | 21 | ||
| 22 | var results = build.BuildAndQuery(Build, "FileShare", "FileSharePermissions"); | 22 | var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); |
| 23 | Assert.Equal(new[] | 23 | Assert.Equal(new[] |
| 24 | { | 24 | { |
| 25 | "FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER\t\t", | 25 | "Binary:Wix4UtilCA_X86\t[Binary data]", |
| 26 | "FileSharePermissions:ExampleFileShare\tEveryone\t1", | 26 | "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t", |
| 27 | "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t", | ||
| 28 | "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t", | ||
| 29 | "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t", | ||
| 30 | "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t", | ||
| 31 | "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t", | ||
| 32 | "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER", | ||
| 33 | "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1", | ||
| 34 | }, results.OrderBy(s => s).ToArray()); | ||
| 35 | } | ||
| 36 | |||
| 37 | [Fact] | ||
| 38 | public void CanBuildUsingFileShareX64() | ||
| 39 | { | ||
| 40 | var folder = TestData.Get(@"TestData\UsingFileShare"); | ||
| 41 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 42 | |||
| 43 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions"); | ||
| 44 | Assert.Equal(new[] | ||
| 45 | { | ||
| 46 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
| 47 | "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t", | ||
| 48 | "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t", | ||
| 49 | "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t", | ||
| 50 | "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t", | ||
| 51 | "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t", | ||
| 52 | "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t", | ||
| 53 | "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER", | ||
| 54 | "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1", | ||
| 55 | }, results.OrderBy(s => s).ToArray()); | ||
| 56 | } | ||
| 57 | |||
| 58 | [Fact] | ||
| 59 | public void CanBuildCloseApplication() | ||
| 60 | { | ||
| 61 | var folder = TestData.Get(@"TestData\CloseApplication"); | ||
| 62 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 63 | |||
| 64 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4CloseApplication"); | ||
| 65 | Assert.Equal(new[] | ||
| 66 | { | ||
| 67 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
| 68 | "CustomAction:Wix4CheckRebootRequired_X86\t65\tWix4UtilCA_X86\tWixCheckRebootRequired\t", | ||
| 69 | "CustomAction:Wix4CloseApplications_X86\t1\tWix4UtilCA_X86\tWixCloseApplications\t", | ||
| 70 | "CustomAction:Wix4CloseApplicationsDeferred_X86\t3073\tWix4UtilCA_X86\tWixCloseApplicationsDeferred\t", | ||
| 71 | "Wix4CloseApplication:CloseMyApp\texplorer.exe\t\t\t3\t\tMYAPPISRUNNING\t\t", | ||
| 72 | }, results.OrderBy(s => s).ToArray()); | ||
| 73 | } | ||
| 74 | |||
| 75 | [Fact] | ||
| 76 | public void CanBuildInternetShortcut() | ||
| 77 | { | ||
| 78 | var folder = TestData.Get(@"TestData\InternetShortcut"); | ||
| 79 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 80 | |||
| 81 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut"); | ||
| 82 | Assert.Equal(new[] | ||
| 83 | { | ||
| 84 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
| 85 | "CustomAction:Wix4CreateInternetShortcuts_X86\t3073\tWix4UtilCA_X86\tWixCreateInternetShortcuts\t", | ||
| 86 | "CustomAction:Wix4RollbackInternetShortcuts_X86\t3329\tWix4UtilCA_X86\tWixRollbackInternetShortcuts\t", | ||
| 87 | "CustomAction:Wix4SchedInternetShortcuts_X86\t1\tWix4UtilCA_X86\tWixSchedInternetShortcuts\t", | ||
| 88 | "RemoveFile:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tvtpzs3bw.lnk|WiX Toolset.lnk\tINSTALLFOLDER\t2", | ||
| 89 | "Wix4InternetShortcut:wixshortcut\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tINSTALLFOLDER\tWiX Toolset.lnk\thttps://wixtoolset.org\t0\t\t0", | ||
| 90 | }, results.OrderBy(s => s).ToArray()); | ||
| 91 | } | ||
| 92 | |||
| 93 | [Fact] | ||
| 94 | public void CanBuildWithPermissionEx() | ||
| 95 | { | ||
| 96 | var folder = TestData.Get(@"TestData\PermissionEx"); | ||
| 97 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 98 | |||
| 99 | var results = build.BuildAndQuery(BuildX64, "Binary", "CreateFolder", "CustomAction", "Wix4SecureObject"); | ||
| 100 | Assert.Equal(new[] | ||
| 101 | { | ||
| 102 | "Binary:Wix4UtilCA_X64\t[Binary data]", | ||
| 103 | "CreateFolder:INSTALLFOLDER\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
| 104 | "CustomAction:Wix4ExecSecureObjects_X64\t11265\tWix4UtilCA_X64\tExecSecureObjects\t", | ||
| 105 | "CustomAction:Wix4ExecSecureObjectsRollback_X64\t11521\tWix4UtilCA_X64\tExecSecureObjectsRollback\t", | ||
| 106 | "CustomAction:Wix4SchedSecureObjects_X64\t1\tWix4UtilCA_X64\tSchedSecureObjects\t", | ||
| 107 | "CustomAction:Wix4SchedSecureObjectsRollback_X64\t1\tWix4UtilCA_X64\tSchedSecureObjectsRollback\t", | ||
| 108 | "Wix4SecureObject:INSTALLFOLDER\tCreateFolder\t\tEveryone\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | ||
| 109 | }, results.OrderBy(s => s).ToArray()); | ||
| 110 | } | ||
| 111 | |||
| 112 | [Fact] | ||
| 113 | public void CanBuildWithEventManifest() | ||
| 114 | { | ||
| 115 | var folder = TestData.Get(@"TestData\EventManifest"); | ||
| 116 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 117 | |||
| 118 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile"); | ||
| 119 | Assert.Equal(new[] | ||
| 120 | { | ||
| 121 | "Binary:Wix4UtilCA_X86\t[Binary data]", | ||
| 122 | "CustomAction:Wix4ConfigureEventManifestRegister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestRegister\t", | ||
| 123 | "CustomAction:Wix4ConfigureEventManifestUnregister_X86\t1\tWix4UtilCA_X86\tConfigureEventManifestUnregister\t", | ||
| 124 | "CustomAction:Wix4ExecXmlFile_X86\t11265\tWix4UtilCA_X86\tExecXmlFile\t", | ||
| 125 | "CustomAction:Wix4ExecXmlFileRollback_X86\t11521\tWix4UtilCA_X86\tExecXmlFileRollback\t", | ||
| 126 | "CustomAction:Wix4RegisterEventManifest_X86\t3073\tWix4UtilCA_X86\tCAQuietExec\t", | ||
| 127 | "CustomAction:Wix4RollbackRegisterEventManifest_X86\t3393\tWix4UtilCA_X86\tCAQuietExec\t", | ||
| 128 | "CustomAction:Wix4RollbackUnregisterEventManifest_X86\t3329\tWix4UtilCA_X86\tCAQuietExec\t", | ||
| 129 | "CustomAction:Wix4SchedXmlFile_X86\t1\tWix4UtilCA_X86\tSchedXmlFile\t", | ||
| 130 | "CustomAction:Wix4UnregisterEventManifest_X86\t3137\tWix4UtilCA_X86\tCAQuietExec\t", | ||
| 131 | "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]", | ||
| 132 | "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
| 133 | "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t", | ||
| 27 | }, results.OrderBy(s => s).ToArray()); | 134 | }, results.OrderBy(s => s).ToArray()); |
| 28 | } | 135 | } |
| 29 | 136 | ||
| @@ -93,8 +200,18 @@ namespace WixToolsetTest.Util | |||
| 93 | 200 | ||
| 94 | private static void Build(string[] args) | 201 | private static void Build(string[] args) |
| 95 | { | 202 | { |
| 96 | var result = WixRunner.Execute(args) | 203 | var result = WixRunner.Execute(args); |
| 97 | .AssertSuccess(); | 204 | result.AssertSuccess(); |
| 205 | } | ||
| 206 | |||
| 207 | private static void BuildX64(string[] args) | ||
| 208 | { | ||
| 209 | var newArgs = args.ToList(); | ||
| 210 | newArgs.Add("-platform"); | ||
| 211 | newArgs.Add("x64"); | ||
| 212 | |||
| 213 | var result = WixRunner.Execute(newArgs.ToArray()); | ||
| 214 | result.AssertSuccess(); | ||
| 98 | } | 215 | } |
| 99 | } | 216 | } |
| 100 | } | 217 | } |
