Commit 506d4fd0 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit/tests: Test whether registry keys ending with trailing backslashes are…

regedit/tests: Test whether registry keys ending with trailing backslashes are imported and created. Signed-off-by: 's avatarHugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 554d996c
......@@ -1488,7 +1488,7 @@ static void test_import_with_whitespace(void)
static void test_key_creation_and_deletion(void)
{
HKEY hkey;
HKEY hkey, subkey;
LONG lr;
exec_import_str("REGEDIT4\n\n"
......@@ -1526,6 +1526,45 @@ static void test_key_creation_and_deletion(void)
lr = RegDeleteKeyA(hkey, "Subkey1d\t");
ok(lr == ERROR_SUCCESS, "got %d, expected 0\n", lr);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey1e\\]\n"
"\"Wine\"=\"Test value\"\n\n");
verify_key(hkey, "Subkey1e\\");
verify_key(hkey, "Subkey1e");
lr = RegOpenKeyExA(hkey, "Subkey1e", 0, KEY_READ, &subkey);
ok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: got %u, expected 0\n", lr);
verify_reg(subkey, "Wine", REG_SZ, "Test value", 11, 0);
RegCloseKey(subkey);
lr = RegDeleteKeyA(hkey, "Subkey1e");
ok(lr == ERROR_SUCCESS, "RegDeleteKeyA failed: got %u, expected 0\n", lr);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey1f\\\\]\n"
"\"Wine\"=\"Test value\"\n\n");
verify_key(hkey, "Subkey1f\\\\");
verify_key(hkey, "Subkey1f\\");
verify_key(hkey, "Subkey1f");
lr = RegOpenKeyExA(hkey, "Subkey1f\\\\", 0, KEY_READ, &subkey);
ok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: got %u, expected 0\n", lr);
verify_reg(subkey, "Wine", REG_SZ, "Test value", 11, 0);
RegCloseKey(subkey);
lr = RegDeleteKeyA(hkey, "Subkey1f\\\\");
ok(lr == ERROR_SUCCESS, "RegDeleteKeyA failed: got %u, expected 0\n", lr);
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey1g\\\\\\\\]\n"
"\"Wine\"=\"Test value\"\n\n");
verify_key(hkey, "Subkey1g\\\\\\\\");
verify_key(hkey, "Subkey1g\\\\");
verify_key(hkey, "Subkey1g\\");
verify_key(hkey, "Subkey1g");
lr = RegOpenKeyExA(hkey, "Subkey1g\\\\", 0, KEY_READ, &subkey);
ok(lr == ERROR_SUCCESS, "RegOpenKeyExA failed: got %u, expected 0\n", lr);
verify_reg(subkey, "Wine", REG_SZ, "Test value", 11, 0);
RegCloseKey(subkey);
lr = RegDeleteKeyA(hkey, "Subkey1g\\\\");
ok(lr == ERROR_SUCCESS, "RegDeleteKeyA failed: got %u, expected 0\n", lr);
/* Test key deletion. We start by creating some registry keys. */
exec_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey2a]\n\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment