mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
[WINESYNC] reg/tests: Split 'export' syntax tests into a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 959ea6677ea0571c5042a5ec5bec33fb5a5f1dc6 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
73ac2fc096
commit
54f7d655e4
2 changed files with 15 additions and 6 deletions
|
@ -168,12 +168,9 @@ const char *escaped_null_test =
|
||||||
|
|
||||||
/* Unit tests */
|
/* Unit tests */
|
||||||
|
|
||||||
static void test_export(void)
|
static void test_command_syntax(void)
|
||||||
{
|
{
|
||||||
LONG err;
|
DWORD r;
|
||||||
DWORD r, dword, type, size;
|
|
||||||
HKEY hkey, subkey;
|
|
||||||
BYTE hex[4], buffer[8];
|
|
||||||
|
|
||||||
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
|
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
|
||||||
|
|
||||||
|
@ -210,6 +207,7 @@ static void test_export(void)
|
||||||
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE, &r);
|
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE, &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||||
|
|
||||||
|
/* This test fails because the registry key doesn't exist */
|
||||||
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE " file.reg", &r);
|
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE " file.reg", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||||
|
|
||||||
|
@ -224,6 +222,16 @@ static void test_export(void)
|
||||||
|
|
||||||
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE " file.reg /reg:64 /reg:64", &r);
|
run_reg_exe("reg export HKEY_CURRENT_USER\\" KEY_BASE " file.reg /reg:64 /reg:64", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_export(void)
|
||||||
|
{
|
||||||
|
LONG err;
|
||||||
|
DWORD r, dword, type, size;
|
||||||
|
HKEY hkey, subkey;
|
||||||
|
BYTE hex[4], buffer[8];
|
||||||
|
|
||||||
|
delete_tree(HKEY_CURRENT_USER, KEY_BASE, 0);
|
||||||
|
|
||||||
/* Test registry export with an empty key */
|
/* Test registry export with an empty key */
|
||||||
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
|
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
|
||||||
|
@ -591,6 +599,7 @@ START_TEST(export)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_command_syntax();
|
||||||
test_export();
|
test_export();
|
||||||
|
|
||||||
/* Check if reg.exe is running with elevated privileges */
|
/* Check if reg.exe is running with elevated privileges */
|
||||||
|
|
|
@ -4,4 +4,4 @@ directories:
|
||||||
files:
|
files:
|
||||||
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
||||||
tags:
|
tags:
|
||||||
wine: fee692178cebd33220027ad6038f6acd8185b77f
|
wine: 959ea6677ea0571c5042a5ec5bec33fb5a5f1dc6
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue