Commit 0c7ab1bd authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advapi32/tests: Don't crash on NT4, W2K and XP-SP1.

parent 9730b285
...@@ -304,8 +304,12 @@ static void test_set_value(void) ...@@ -304,8 +304,12 @@ static void test_set_value(void)
static const char string2A[] = "This\0Breaks\0\0A\0\0\0Lot\0\0\0\0"; static const char string2A[] = "This\0Breaks\0\0A\0\0\0Lot\0\0\0\0";
static const char substring2A[] = "This"; static const char substring2A[] = "This";
ret = RegSetValueA(hkey_main, NULL, REG_SZ, NULL, 0); if (0)
ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); {
/* Crashes on NT4, Windows 2000 and XP SP1 */
ret = RegSetValueA(hkey_main, NULL, REG_SZ, NULL, 0);
ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
}
ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, sizeof(string1A)); ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, sizeof(string1A));
ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError());
...@@ -367,9 +371,12 @@ static void test_set_value(void) ...@@ -367,9 +371,12 @@ static void test_set_value(void)
/* 9x doesn't support W-calls, so don't test them then */ /* 9x doesn't support W-calls, so don't test them then */
if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return; if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return;
if (0)
ret = RegSetValueW(hkey_main, NULL, REG_SZ, NULL, 0); {
ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); /* Crashes on NT4, Windows 2000 and XP SP1 */
ret = RegSetValueW(hkey_main, NULL, REG_SZ, NULL, 0);
ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret);
}
ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, sizeof(string1W)); ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, sizeof(string1W));
ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment