reg/tests: Move 'delete' syntax tests into a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
304b80a9b5
commit
7c9f372480
|
@ -19,11 +19,9 @@
|
||||||
|
|
||||||
#include "reg_test.h"
|
#include "reg_test.h"
|
||||||
|
|
||||||
static void test_delete(void)
|
static void test_command_syntax(void)
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
|
||||||
DWORD r;
|
DWORD r;
|
||||||
const DWORD deadbeef = 0xdeadbeef;
|
|
||||||
|
|
||||||
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
|
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
|
||||||
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
|
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
|
||||||
|
@ -68,6 +66,16 @@ static void test_delete(void)
|
||||||
|
|
||||||
run_reg_exe("reg delete HKCU\\" KEY_BASE " /f /v", &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);
|
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_delete(void)
|
||||||
|
{
|
||||||
|
HKEY hkey;
|
||||||
|
DWORD r;
|
||||||
|
const DWORD deadbeef = 0xdeadbeef;
|
||||||
|
|
||||||
|
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
|
||||||
|
verify_key_nonexist(HKEY_CURRENT_USER, KEY_BASE, 0);
|
||||||
|
|
||||||
/* Create a test key */
|
/* Create a test key */
|
||||||
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
|
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
|
||||||
|
@ -142,5 +150,6 @@ START_TEST(delete)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_command_syntax();
|
||||||
test_delete();
|
test_delete();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue