https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2592a360a0702302c5119d...
commit 2592a360a0702302c5119d0805864148639926d0 Author: winesync ros-dev@reactos.org AuthorDate: Mon Jan 17 18:47:37 2022 +0100 Commit: Thomas Csovcsity thc.fr13nd@gmail.com CommitDate: Sun Jun 19 13:06:38 2022 +0200
[WINESYNC] reg/tests: Test use of registry views when querying registry values.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id 45955658e18b65d3af701885e2cfa58bd0c95ceb by Hugh McMaster hugh.mcmaster@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 eca392b64d9..dcc98a9a0c4 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -322,6 +322,12 @@ static const char *test9b = "\r\n" " Test4 REG_DWORD 0xabc\r\n" " Wine REG_SZ Second instance\r\n\r\n";
+static const char *test9c = "\r\n" + "HKEY_LOCAL_MACHINE\" KEY_BASE "\r\n" + " Wine REG_SZ First instance\r\n\r\n" + "HKEY_LOCAL_MACHINE\" KEY_BASE "\subkey\r\n" + " Wine REG_SZ Second instance\r\n\r\n"; + static void create_test_key(REGSAM sam) { HKEY hkey, subkey; @@ -367,6 +373,10 @@ static void test_registry_view_win32(void) ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, 0); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY);
/* Try querying the 64-bit registry view, which doesn't exist on 32-bit Windows */ @@ -380,6 +390,10 @@ static void test_registry_view_win32(void) ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, 0); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
@@ -407,6 +421,10 @@ static void test_registry_view_win64(void) todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, TODO_REG_COMPARE);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); + todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, TODO_REG_COMPARE); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
@@ -421,6 +439,10 @@ static void test_registry_view_win64(void) ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, 0); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
@@ -447,6 +469,10 @@ static void test_registry_view_wow64(void) ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, 0);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:32", buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, 0); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_32KEY); delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY);
@@ -461,6 +487,10 @@ static void test_registry_view_wow64(void) todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); compare_query(buf, test9b, FALSE, TODO_REG_COMPARE);
+ read_reg_output("reg query HKLM\" KEY_BASE " /v Wine /s /reg:64", buf, sizeof(buf), &r); + todo_wine ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test9c, TRUE, TODO_REG_COMPARE); + delete_tree(HKEY_LOCAL_MACHINE, KEY_BASE, KEY_WOW64_64KEY); }
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index dfe68741881..3c5790ae82d 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: 3186a0046336e82a2e8133f8a5958e6250c6fe61 + wine: 45955658e18b65d3af701885e2cfa58bd0c95ceb