--- profile.c Tue Jul 02 11:37:56 2002 +++ profile.c Wed Jul 03 01:03:18 2002 @@ -37,10 +37,45 @@ * */ +#include "windows.h" + #include -#include "wine/test.h" -#include "winbase.h" -#include "winerror.h" + +static const char *current_file; +static int current_line; +static int current_xfail; + +#define ok (winetest_set_ok_location(__FILE__, __LINE__, 0), 0) ? 0 : winetest_ok +#define xfail (winetest_set_ok_location(__FILE__, __LINE__, 1), 0) ? 0 : winetest_ok +#define trace printf + +void winetest_set_ok_location(const char *file, int line, int expected_fail) +{ + current_file = file; + current_line = line; + current_xfail = expected_fail; +} + +int winetest_ok( int condition, const char *msg, ... ) +{ + va_list valist; + + if (!condition) + { + fprintf( stderr, "%s:%d: %s", current_file, current_line, + current_xfail ? "XFAIL" : "FAIL" ); + if (msg && msg[0]) + { + va_start(valist, msg); + fprintf( stderr,": "); + vfprintf(stderr, msg, valist); + va_end(valist); + } + fputc( '\n', stderr ); +// if (!current_xfail) exit(-1); + } + return 1; +} char winpath[1024]; @@ -210,8 +245,8 @@ * Special case: NULL lpReturnedString with size > 0 * This causes an application error in win2k. Let's make wine better :) */ - ok(!GetPrivateProfileSectionA("No Keys", NULL, 1024, "C:\\test.ini"), - "special case not handled properly\n"); +// ok(!GetPrivateProfileSectionA("No Keys", NULL, 1024, "C:\\test.ini"), +// "special case not handled properly\n"); } static void test_GetPrivateProfileSectionNamesA( void ) @@ -293,8 +328,8 @@ * Special case: NULL lpReturnedString with size > 0 * This causes an application error in win2k. Let's make wine better :) */ - ok(!GetPrivateProfileSectionNamesA(NULL, 1024, "C:\\test.ini"), - "special case not handled"); +// ok(!GetPrivateProfileSectionNamesA(NULL, 1024, "C:\\test.ini"), +// "special case not handled"); } static void test_GetPrivateProfileStringA( void ) @@ -695,7 +730,7 @@ DeleteFileA("C:\\result.ini"); } -START_TEST(profile) +void main(void) { char testname[1024], filename[1024];