https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4dbcf50583f85e7804659…
commit 4dbcf50583f85e7804659cc3dc577be45316cc24
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 14:51:45 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:27 2022 +0200
[WINESYNC] reg/tests: Move /v* syntax tests to the 'add' and 'delete'
test sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id e6e227f21de08c7ddfe3e48b3ceb2fef01b6c0a6 by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/reg.c | 73 +++++++++++++++++-------------------
sdk/tools/winesync/reg.cfg | 2 +-
2 files changed, 36 insertions(+), 39 deletions(-)
diff --git a/modules/rostests/winetests/reg/reg.c b/modules/rostests/winetests/reg/reg.c
index e11e4e9227e..489989f12a8 100644
--- a/modules/rostests/winetests/reg/reg.c
+++ b/modules/rostests/winetests/reg/reg.c
@@ -574,6 +574,9 @@ static void test_add(void)
RegCloseKey(hkey);
/* Test duplicate switches */
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /v Wine /t REG_DWORD /d 0x1 /v
Test /f", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dup1 /t REG_DWORD /d 123 /f
/t REG_SZ", &r);
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
"got exit code %u, expected 1\n", r);
@@ -581,6 +584,17 @@ static void test_add(void)
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dup2 /t REG_DWORD /d 123 /f
/d 456", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
+ /* Multiple /v* switches */
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /v Wine /ve", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ /* No /v argument */
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /v", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /d Test /f /v", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
/* Test invalid switches */
run_reg_exe("reg add HKCU\\" KEY_BASE " /v invalid1 /a",
&r);
ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
@@ -618,6 +632,27 @@ static void test_delete(void)
run_reg_exe("reg delete -H", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ /* Multiple /v* switches */
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /ve",
&r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /va",
&r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /ve /va", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /v Test /f",
&r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ /* No /v argument */
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /v", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /f /v", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ /* Create a test key */
add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey);
add_value(hkey, "foo", REG_DWORD, &deadbeef, sizeof(deadbeef));
add_value(hkey, "bar", REG_DWORD, &deadbeef, sizeof(deadbeef));
@@ -757,43 +792,6 @@ static void test_query(void)
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
}
-static void test_v_flags(void)
-{
- DWORD r;
-
- run_reg_exe("reg add HKCU\\" KEY_BASE " /v Wine /ve", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /ve",
&r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /va",
&r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /ve /va", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- /* No /v argument */
- run_reg_exe("reg add HKCU\\" KEY_BASE " /v", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg add HKCU\\" KEY_BASE " /d Test /f /v", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /v", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /f /v", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- /* Multiple /v switches */
- run_reg_exe("reg add HKCU\\" KEY_BASE " /v Wine /t REG_DWORD /d 0x1 /v
Test /f", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-
- run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Wine /v Test /f",
&r);
- ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
-}
-
static BOOL write_file(const void *str, DWORD size)
{
HANDLE file;
@@ -4772,7 +4770,6 @@ START_TEST(reg)
test_add();
test_delete();
test_query();
- test_v_flags();
test_import();
test_unicode_import();
test_import_with_whitespace();
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 08fb675aadd..6be9ff46c07 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: 405853adb53695c0fd3f7d38ac733dd6900a48dd
+ wine: e6e227f21de08c7ddfe3e48b3ceb2fef01b6c0a6