Skip to content

Commit

Permalink
reg/tests: Move 'delete' syntax tests into a separate function.
Browse files Browse the repository at this point in the history
Signed-off-by: Hugh McMaster <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
hughmcmaster authored and julliard committed Jun 18, 2021
1 parent 304b80a commit 7c9f372
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions programs/reg/tests/delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@

#include "reg_test.h"

static void test_delete(void)
static void test_command_syntax(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);
Expand Down Expand Up @@ -68,6 +66,16 @@ static void test_delete(void)

run_reg_exe("reg delete HKCU\\" KEY_BASE " /f /v", &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 */
add_key(HKEY_CURRENT_USER, KEY_BASE, 0, &hkey);
Expand Down Expand Up @@ -142,5 +150,6 @@ START_TEST(delete)
return;
}

test_command_syntax();
test_delete();
}

0 comments on commit 7c9f372

Please sign in to comment.