Hugh McMaster : reg/tests: Add some mixed key creation and deletion tests.
Alexandre Julliard
julliard at winehq.org
Fri Aug 25 12:30:11 CDT 2017
Module: wine
Branch: master
Commit: b7c838bf98ce8e6b313ff4d2a11fbed8832b09a3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7c838bf98ce8e6b313ff4d2a11fbed8832b09a3
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Fri Aug 25 05:36:58 2017 +0000
reg/tests: Add some mixed key creation and deletion tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/reg/tests/reg.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index f6a7ce1..8a9d12a 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -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"
More information about the wine-cvs
mailing list