https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1aea6bdfcf4c4491ead88…
commit 1aea6bdfcf4c4491ead883ace1ca8a220645eafc
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 21:15:48 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:34 2022 +0200
[WINESYNC] reg/tests: Rework syntax tests for the 'copy' operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 1ce21dbb5f2eed468c3748a2de1f25744e10e04c by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
modules/rostests/winetests/reg/copy.c | 32 +++++++++++++++-----------------
sdk/tools/winesync/reg.cfg | 2 +-
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/modules/rostests/winetests/reg/copy.c
b/modules/rostests/winetests/reg/copy.c
index a8956d7e9a0..31223a3d314 100644
--- a/modules/rostests/winetests/reg/copy.c
+++ b/modules/rostests/winetests/reg/copy.c
@@ -18,15 +18,12 @@
#include "reg_test.h"
-#define COPY_DEST KEY_WINE "\\reg_copy"
+#define COPY_SRC KEY_WINE "\\reg_copy"
-static void test_copy(void)
+static void test_command_syntax(void)
{
DWORD r;
- delete_tree(HKEY_CURRENT_USER, KEY_BASE);
- verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE);
-
run_reg_exe("reg copy", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
@@ -63,37 +60,38 @@ static void test_copy(void)
run_reg_exe("reg copy /f /s", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /f",
&r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " /f", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " foo /f",
&r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " foo /f", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy /f HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" KEY_BASE, &r);
+ run_reg_exe("reg copy /f HKCU\\" COPY_SRC " HKCU\\" KEY_BASE,
&r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy /f HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" COPY_DEST, &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " /f HKCU\\" KEY_BASE,
&r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /f
HKEY_CURRENT_USER\\" COPY_DEST, &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " /s HKCU\\" KEY_BASE,
&r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE " /s
HKEY_CURRENT_USER\\" COPY_DEST, &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" KEY_BASE "
/a", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" COPY_DEST " /a", &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" KEY_BASE "
/f /a", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" COPY_DEST " /f /a", &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" KEY_BASE, &r);
+ /* Source and destination keys are the same */
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC,
&r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" KEY_BASE " /f", &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC "
/f", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg copy HKEY_CURRENT_USER\\" KEY_BASE "
HKEY_CURRENT_USER\\" KEY_BASE " /s /f", &r);
+ run_reg_exe("reg copy HKCU\\" COPY_SRC " HKCU\\" COPY_SRC "
/s /f", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
}
@@ -106,5 +104,5 @@ START_TEST(copy)
return;
}
- test_copy();
+ test_command_syntax();
}
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index 09d6e269b34..7a1a3cce2db 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: 33cfc644a055a9bc88253ae8d8c824ad603e7a02
+ wine: 1ce21dbb5f2eed468c3748a2de1f25744e10e04c