https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4771673c8fc3d4a34c8f2…
commit 4771673c8fc3d4a34c8f228e730911e68caa5e1b
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 21:08:23 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:33 2022 +0200
[WINESYNC] reg/tests: Add tests for querying a key only containing subkeys.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 8b0602023add5c530e4f257ebf07ebae8e4ffdba by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/query.c | 30 ++++++++++++++++++++++++++++++
sdk/tools/winesync/reg.cfg | 2 +-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/modules/rostests/winetests/reg/query.c
b/modules/rostests/winetests/reg/query.c
index 7c8a1795b34..5c97554648e 100644
--- a/modules/rostests/winetests/reg/query.c
+++ b/modules/rostests/winetests/reg/query.c
@@ -148,6 +148,18 @@ static void test_query(void)
"HKEY_CURRENT_USER\\" KEY_BASE "\\subkey\r\n"
" Wine REG_SZ Second instance\r\n\r\n";
+ const char *test8a = "\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey1\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey2\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey3\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey4\r\n";
+
+ const char *test8b = "\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey1\r\n\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey2\r\n\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey3\r\n\r\n"
+ "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey4\r\n\r\n";
+
DWORD r, dword = 0x123;
HKEY hkey, subkey;
BYTE buf[512];
@@ -259,6 +271,24 @@ static void test_query(void)
"got exit code %d, expected 0\n", r);
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
+
+ /* Subkeys only */
+ add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey);
+ add_key(hkey, "subkey1", NULL);
+ add_key(hkey, "subkey2", NULL);
+ add_key(hkey, "subkey3", NULL);
+ add_key(hkey, "subkey4", NULL);
+ close_key(hkey);
+
+ read_reg_output("reg query HKCU\\" KEY_BASE, buf, sizeof(buf), &r);
+ ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ compare_query(buf, test8a, FALSE, TODO_REG_COMPARE);
+
+ read_reg_output("reg query HKCU\\" KEY_BASE " /s", buf,
sizeof(buf), &r);
+ ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ compare_query(buf, test8b, FALSE, TODO_REG_COMPARE);
+
+ delete_tree(HKEY_CURRENT_USER, KEY_BASE);
}
START_TEST(query)
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index e6222899264..5e3749d9529 100644
--- a/sdk/tools/winesync/reg.cfg
+++ b/sdk/tools/winesync/reg.cfg
@@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
- wine: c573fce35b80d60b38b720a82fee53941c7490ea
+ wine: 8b0602023add5c530e4f257ebf07ebae8e4ffdba