reg/tests: Rename reg.c to add.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cc4cc7086f
commit
3c2db20f66
|
@ -2,9 +2,9 @@ TESTDLL = reg.exe
|
||||||
IMPORTS = advapi32
|
IMPORTS = advapi32
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
add.c \
|
||||||
copy.c \
|
copy.c \
|
||||||
delete.c \
|
delete.c \
|
||||||
export.c \
|
export.c \
|
||||||
import.c \
|
import.c \
|
||||||
query.c \
|
query.c
|
||||||
reg.c
|
|
||||||
|
|
|
@ -353,8 +353,10 @@ static void test_add(void)
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin2 /f /d x01", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin2 /f /d x01", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin3 /f /d 01x", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_BINARY /v bin3 /f /d 01x", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
|
@ -397,13 +399,17 @@ static void test_add(void)
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword0 /t REG_DWORD /f /d", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword0 /t REG_DWORD /f /d", &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);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword1 /t REG_DWORD /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword1 /t REG_DWORD /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
|
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
|
||||||
"got exit code %d, expected 1\n", r);
|
"got exit code %d, expected 1\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword2 /t REG_DWORD /d zzz /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword2 /t REG_DWORD /d zzz /f", &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);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword3 /t REG_DWORD /d deadbeef /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword3 /t REG_DWORD /d deadbeef /f", &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);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword4 /t REG_DWORD /d 123xyz /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword4 /t REG_DWORD /d 123xyz /f", &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);
|
||||||
|
|
||||||
|
@ -431,6 +437,7 @@ static void test_add(void)
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword9 /f /d -1", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword9 /f /d -1", &r);
|
||||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword10 /f /d -0x1", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_DWORD /v dword10 /f /d -0x1", &r);
|
||||||
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u\n", r);
|
||||||
|
|
||||||
|
@ -503,14 +510,19 @@ static void test_add(void)
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi5 /s \"#randomgibberish\" /d \"three#little#strings\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi5 /s \"#randomgibberish\" /d \"three#little#strings\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi6 /s \"\\0\" /d \"three\\0little\\0strings\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi6 /s \"\\0\" /d \"three\\0little\\0strings\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s \"\" /d \"three#little#strings\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s \"\" /d \"three#little#strings\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi8 /s \"#\" /d \"##\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi8 /s \"#\" /d \"##\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s \"#\" /d \"two##strings\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s \"#\" /d \"two##strings\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi10 /s \"#\" /d \"#a\" /f", &r);
|
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi10 /s \"#\" /d \"#a\" /f", &r);
|
||||||
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
|
||||||
|
|
||||||
|
@ -613,7 +625,7 @@ static void test_add(void)
|
||||||
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
|
delete_tree(HKEY_CURRENT_USER, KEY_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(reg)
|
START_TEST(add)
|
||||||
{
|
{
|
||||||
DWORD r;
|
DWORD r;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#define REG_EXIT_SUCCESS 0
|
#define REG_EXIT_SUCCESS 0
|
||||||
#define REG_EXIT_FAILURE 1
|
#define REG_EXIT_FAILURE 1
|
||||||
|
|
||||||
/* Helper functions */
|
/* add.c */
|
||||||
#define run_reg_exe(c,r) run_reg_exe_(__LINE__,c,r)
|
#define run_reg_exe(c,r) run_reg_exe_(__LINE__,c,r)
|
||||||
BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc);
|
BOOL run_reg_exe_(unsigned line, const char *cmd, DWORD *rc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue