Jonathan Vollebregt : advapi32/tests: Add trailing slashes tests for RegOpen/CreateKey.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 7 06:44:36 CST 2014


Module: wine
Branch: master
Commit: 2e78a2c921cb3d92d116ecd72985784d488031f7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2e78a2c921cb3d92d116ecd72985784d488031f7

Author: Jonathan Vollebregt <jnvsor at gmail.com>
Date:   Thu Nov  6 19:03:53 2014 +0100

advapi32/tests: Add trailing slashes tests for RegOpen/CreateKey.

---

 dlls/advapi32/tests/registry.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 382d8cc..3aff541 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -953,6 +953,11 @@ static void test_reg_open_key(void)
     ok(hkResult != NULL, "hkResult != NULL\n");
     RegCloseKey(hkResult);
 
+    /* trailing slashes */
+    ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test\\\\", &hkResult);
+    ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret);
+    RegCloseKey(hkResult);
+
     /* open nonexistent key
     * check that hkResult is set to NULL
     */
@@ -1218,6 +1223,12 @@ static void test_reg_create_key(void)
         RegCloseKey(hkey1);
     }
 
+    /* trailing backslash characters */
+    ret = RegCreateKeyExA(hkey_main, "Subkey4\\\\", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
+    ok(ret == ERROR_SUCCESS, "RegCreateKeyExA failed with error %d\n", ret);
+    RegDeleteKeyA(hkey1, "");
+    RegCloseKey(hkey1);
+
     /* WOW64 flags - open an existing key */
     hkey1 = NULL;
     ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);




More information about the wine-cvs mailing list