reg/tests: Add some mixed key creation and deletion tests.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-08-25 05:36:58 +00:00 committed by Alexandre Julliard
parent 60e771e686
commit b7c838bf98
1 changed files with 44 additions and 0 deletions

View File

@ -1734,6 +1734,28 @@ static void test_import(void)
verify_key_nonexist(hkey, "Subkey3a");
verify_key_nonexist(hkey, "Subkey3b");
/* Test mixed key creation and deletion. We start by creating a subkey. */
test_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key(hkey, "Subkey4a");
test_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n"
"[-HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n"
"\"Wine46a\"=dword:12345678\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key_nonexist(hkey, "Subkey4a");
todo_wine verify_reg_nonexist(hkey, "Wine46a");
test_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n\n"
"[HKEY_CURRENT_USERS\\" KEY_BASE "\\Subkey4b]\n"
"\"Wine46b\"=dword:12345678\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key_nonexist(hkey, "Subkey4b");
verify_reg_nonexist(hkey, "Wine46b");
/* Test value deletion. We start by creating some registry values. */
test_import_str("REGEDIT4\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
@ -3190,6 +3212,28 @@ static void test_unicode_import(void)
verify_key_nonexist(hkey, "Subkey3a");
verify_key_nonexist(hkey, "Subkey3b");
/* Test mixed key creation and deletion. We start by creating a subkey. */
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "\\Subkey4a]\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key(hkey, "Subkey4a");
test_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"
"\"Wine46a\"=dword:12345678\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key_nonexist(hkey, "Subkey4a");
todo_wine verify_reg_nonexist(hkey, "Wine46a");
test_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"
"\"Wine46b\"=dword:12345678\n\n", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_key_nonexist(hkey, "Subkey4b");
verify_reg_nonexist(hkey, "Wine46b");
/* Test value deletion. We start by creating some registry values. */
test_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
"[HKEY_CURRENT_USER\\" KEY_BASE "]\n"