https://git.reactos.org/?p=reactos.git;a=commitdiff;h=26226dc57215f1a674c53…
commit 26226dc57215f1a674c5339dfac189ace8edcd0b
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 20:41:28 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:30 2022 +0200
[WINESYNC] reg/tests: Add tests for duplicate command-line switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id a87a380a75723e0aa0e257c7efcc3024b56fb49d by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/add.c | 6 ++++++
modules/rostests/winetests/reg/delete.c | 9 +++++++++
modules/rostests/winetests/reg/query.c | 9 +++++++++
sdk/tools/winesync/reg.cfg | 2 +-
4 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c
index 6d513f14fbd..8b6f234c6d0 100644
--- a/modules/rostests/winetests/reg/add.c
+++ b/modules/rostests/winetests/reg/add.c
@@ -233,6 +233,9 @@ static void test_add(void)
run_reg_exe("reg add HKCU\\" KEY_BASE " /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /f /f", &r);
+ todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
open_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
/* Test empty type */
@@ -291,6 +294,9 @@ static void test_add(void)
ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r);
verify_reg(hkey, NULL, REG_SZ, "", 1, 0);
+ run_reg_exe("reg add HKCU\\" KEY_BASE " /ve /f /ve", &r);
+ todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
run_reg_exe("reg add HKEY_CURRENT_USER\\" KEY_BASE " /ve /d WineTEST
/f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
verify_reg(hkey, "", REG_SZ, "WineTEST", 9, 0);
diff --git a/modules/rostests/winetests/reg/delete.c
b/modules/rostests/winetests/reg/delete.c
index ee2257d42c5..77d95d013c9 100644
--- a/modules/rostests/winetests/reg/delete.c
+++ b/modules/rostests/winetests/reg/delete.c
@@ -47,9 +47,18 @@ static void test_delete(void)
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 /ve", &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 " /va /va", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg delete HKCU\\" KEY_BASE " /v Test /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);
diff --git a/modules/rostests/winetests/reg/query.c
b/modules/rostests/winetests/reg/query.c
index afa655f8d74..fcd43a4b195 100644
--- a/modules/rostests/winetests/reg/query.c
+++ b/modules/rostests/winetests/reg/query.c
@@ -74,6 +74,12 @@ static void test_query(void)
run_reg_exe("reg query HKCU\\" KEY_BASE " /ve", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
+ run_reg_exe("reg query HKCU\\" KEY_BASE " /v Test /v Wine",
&r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
+ run_reg_exe("reg query HKCU\\" KEY_BASE " /v Test /ve", &r);
+ ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
/* Create a test subkey */
add_key(key, "Subkey", &subkey);
add_value(subkey, "Test", REG_SZ, world, sizeof(world));
@@ -110,6 +116,9 @@ static void test_query(void)
ok(r == REG_EXIT_SUCCESS || r == REG_EXIT_FAILURE /* WinXP */,
"got exit code %d, expected 0\n", r);
+ run_reg_exe("reg query HKCU\\" KEY_BASE " /s /s", &r);
+ todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
+
/* Clean-up, then query */
delete_key(key, "subkey");
close_key(key);
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 54ac54e7c0e..decb94f0a0a 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: be718697a2e1b30944c019218ef635f6737503d5
+ wine: a87a380a75723e0aa0e257c7efcc3024b56fb49d