Module: wine Branch: master Commit: 0c7ab1bd3079acd7901a381c5ecbea41f4336014 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0c7ab1bd3079acd7901a381c5e...
Author: Paul Vriens paul.vriens.wine@gmail.com Date: Mon Feb 25 15:41:18 2008 +0100
advapi32/tests: Don't crash on NT4, W2K and XP-SP1.
---
dlls/advapi32/tests/registry.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 1180818..474879e 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -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 substring2A[] = "This";
- 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); + if (0) + { + /* 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)); ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); @@ -367,9 +371,12 @@ static void test_set_value(void) /* 9x doesn't support W-calls, so don't test them then */ if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return;
- - 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); + if (0) + { + /* 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)); ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError());