diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 8a828d706bc..9b2f1fbaa1f 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -3006,6 +3006,25 @@ static void test_key_creation_and_deletion(void) verify_key_nonexist(hkey, "Subkey3a"); verify_key_nonexist(hkey, "Subkey3b"); + /* Test mixed key creation and deletion. We start by creating a subkey. */ + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n\n"); + verify_key(hkey, "Subkey4a"); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n" + "[-HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n" + "\"Wine1a\"=dword:12345678\n\n"); + verify_key_nonexist(hkey, "Subkey4a"); + todo_wine verify_reg_nonexist(hkey, "Wine1a"); + + exec_import_str("REGEDIT4\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n" + "[HKEY_CURRENT_USERS\\" KEY_BASE "\\Subkey4b]\n" + "\"Wine1b\"=dword:12345678\n\n"); + verify_key_nonexist(hkey, "Subkey4b"); + verify_reg_nonexist(hkey, "Wine1b"); + lr = RegCloseKey(hkey); ok(lr == ERROR_SUCCESS, "RegCloseKey failed: got %d, expected 0\n", lr); @@ -3137,6 +3156,25 @@ static void test_key_creation_and_deletion_unicode(void) verify_key_nonexist(hkey, "Subkey3a"); verify_key_nonexist(hkey, "Subkey3b"); + /* Test mixed key creation and deletion. We start by creating a subkey. */ + exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n\n"); + verify_key(hkey, "Subkey4a"); + + exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n" + "[-HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n" + "\"Wine1a\"=dword:12345678\n\n"); + verify_key_nonexist(hkey, "Subkey4a"); + todo_wine verify_reg_nonexist(hkey, "Wine1a"); + + exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n" + "[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n" + "[HKEY_CURRENT_USERS\\" KEY_BASE "\\Subkey4b]\n" + "\"Wine1b\"=dword:12345678\n\n"); + verify_key_nonexist(hkey, "Subkey4b"); + verify_reg_nonexist(hkey, "Wine1b"); + lr = RegCloseKey(hkey); ok(lr == ERROR_SUCCESS, "RegCloseKey failed: got %d, expected 0\n", lr);