Hugh McMaster : regedit/tests: Add additional tests with embedded NUL characters.
Alexandre Julliard
julliard at winehq.org
Tue Feb 23 15:54:46 CST 2021
Module: wine
Branch: master
Commit: 704bd45da5a718fbf7be7b5d07bfcb7dfc831ab3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=704bd45da5a718fbf7be7b5d07bfcb7dfc831ab3
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Mon Feb 22 22:24:04 2021 +1100
regedit/tests: Add additional tests with embedded NUL characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/regedit/tests/regedit.c | 34 ++++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index ad9e0a2bffb..34acd18228b 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -1649,7 +1649,7 @@ static void test_invalid_import(void)
"\"Wine33c\"=\"Value1\\0\n"
"\"Wine33d\"=\"Value2\\0\\0\\0\\0\n"
"\"Wine33e\"=\"Value3\\0Value4\n"
- "\"Wine33f\"=\"\\0Value4\n\n");
+ "\"Wine33f\"=\"\\0Value5\n\n");
verify_reg_nonexist(hkey, "Wine33a");
verify_reg_nonexist(hkey, "Wine33b");
verify_reg_nonexist(hkey, "Wine33c");
@@ -1657,6 +1657,21 @@ static void test_invalid_import(void)
verify_reg_nonexist(hkey, "Wine33e");
verify_reg_nonexist(hkey, "Wine33f");
+ exec_import_str("REGEDIT4\n\n"
+ "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+ "\"Wine34a\"=\"\\0\"\n"
+ "\"Wine34b\"=\"\\0\\0\"\n"
+ "\"Wine34c\"=\"Value1\\0\"\n"
+ "\"Wine34d\"=\"Value2\\0\\0\\0\\0\"\n"
+ "\"Wine34e\"=\"Value3\\0Value4\"\n"
+ "\"Wine34f\"=\"\\0Value5\"\n\n");
+ todo_wine verify_reg_nonexist(hkey, "Wine34a");
+ todo_wine verify_reg_nonexist(hkey, "Wine34b");
+ todo_wine verify_reg_nonexist(hkey, "Wine34c");
+ todo_wine verify_reg_nonexist(hkey, "Wine34d");
+ todo_wine verify_reg_nonexist(hkey, "Wine34e");
+ todo_wine verify_reg_nonexist(hkey, "Wine34f");
+
close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE);
@@ -2160,7 +2175,7 @@ static void test_invalid_import_unicode(void)
"\"Wine33c\"=\"Value1\\0\n"
"\"Wine33d\"=\"Value2\\0\\0\\0\\0\n"
"\"Wine33e\"=\"Value3\\0Value4\n"
- "\"Wine33f\"=\"\\0Value4\n\n");
+ "\"Wine33f\"=\"\\0Value5\n\n");
verify_reg_nonexist(hkey, "Wine33a");
verify_reg_nonexist(hkey, "Wine33b");
verify_reg_nonexist(hkey, "Wine33c");
@@ -2168,6 +2183,21 @@ static void test_invalid_import_unicode(void)
verify_reg_nonexist(hkey, "Wine33e");
verify_reg_nonexist(hkey, "Wine33f");
+ exec_import_wstr("\xef\xbb\xbfWindows Registry Editor Version 5.00\n\n"
+ "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"
+ "\"Wine34a\"=\"\\0\"\n"
+ "\"Wine34b\"=\"\\0\\0\"\n"
+ "\"Wine34c\"=\"Value1\\0\"\n"
+ "\"Wine34d\"=\"Value2\\0\\0\\0\\0\"\n"
+ "\"Wine34e\"=\"Value3\\0Value4\"\n"
+ "\"Wine34f\"=\"\\0Value5\"\n\n");
+ todo_wine verify_reg_nonexist(hkey, "Wine34a");
+ todo_wine verify_reg_nonexist(hkey, "Wine34b");
+ todo_wine verify_reg_nonexist(hkey, "Wine34c");
+ todo_wine verify_reg_nonexist(hkey, "Wine34d");
+ todo_wine verify_reg_nonexist(hkey, "Wine34e");
+ todo_wine verify_reg_nonexist(hkey, "Wine34f");
+
close_key(hkey);
delete_key(HKEY_CURRENT_USER, KEY_BASE);
More information about the wine-cvs
mailing list