Add trailing '\n's to ok() calls (advapi32)
Francois Gouget
fgouget at free.fr
Sat Jan 24 13:59:58 CST 2004
Changelog:
* dlls/advapi32/tests/registry.c
Add trailing '\n's to ok() calls.
Index: dlls/advapi32/tests/registry.c
===================================================================
RCS file: /home/cvs/wine/dlls/advapi32/tests/registry.c,v
retrieving revision 1.6
diff -u -r1.6 registry.c
--- dlls/advapi32/tests/registry.c 25 Sep 2003 20:29:41 -0000 1.6
+++ dlls/advapi32/tests/registry.c 23 Jan 2004 12:37:40 -0000
@@ -68,7 +68,7 @@
static const WCHAR xxxW[] = {'x','x','x','x','x','x','x','x',0};
res = RegSetValueExA( hkey_main, "Test", 0, REG_SZ, (BYTE *)"foobar", 7 );
- ok( res == 0, "RegSetValueExA failed error %ld", res );
+ ok( res == 0, "RegSetValueExA failed error %ld\n", res );
/* overflow both name and data */
val_count = 2;
@@ -77,12 +77,12 @@
strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( hkey_main, 0, value, &val_count, NULL, &type, data, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 2, "val_count set to %ld", val_count );
- ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'", value );
- ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'", data );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 2, "val_count set to %ld\n", val_count );
+ ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value );
+ ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data );
/* overflow name */
val_count = 3;
@@ -91,15 +91,15 @@
strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( hkey_main, 0, value, &val_count, NULL, &type, data, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
/* Win9x returns 2 as specified by MSDN but NT returns 3... */
- ok( val_count == 2 || val_count == 3, "val_count set to %ld", val_count );
- ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
+ ok( val_count == 2 || val_count == 3, "val_count set to %ld\n", val_count );
+ ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
#if 0
/* v5.1.2600.0 (XP Home) does not touch value or data in this case */
- ok( !strcmp( value, "Te" ), "value set to '%s' instead of 'Te'", value );
- ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'", data );
+ ok( !strcmp( value, "Te" ), "value set to '%s' instead of 'Te'\n", value );
+ ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'\n", data );
#endif
/* overflow empty name */
@@ -109,14 +109,14 @@
strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( hkey_main, 0, value, &val_count, NULL, &type, data, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 0, "val_count set to %ld", val_count );
- ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'", value );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 0, "val_count set to %ld\n", val_count );
+ ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value );
#if 0
/* v5.1.2600.0 (XP Home) does not touch data in this case */
- ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'", data );
+ ok( !strcmp( data, "foobar" ), "data set to '%s' instead of 'foobar'\n", data );
#endif
/* overflow data */
@@ -126,12 +126,12 @@
strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( hkey_main, 0, value, &val_count, NULL, &type, data, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 20, "val_count set to %ld", val_count );
- ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'", value );
- ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'", data );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 20, "val_count set to %ld\n", val_count );
+ ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value );
+ ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data );
/* no overflow */
val_count = 20;
@@ -140,12 +140,12 @@
strcpy( value, "xxxxxxxxxx" );
strcpy( data, "xxxxxxxxxx" );
res = RegEnumValueA( hkey_main, 0, value, &val_count, NULL, &type, data, &data_count );
- ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld", res );
- ok( val_count == 4, "val_count set to %ld instead of 4", val_count );
- ok( data_count == 7, "data_count set to %ld instead of 7", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !strcmp( value, "Test" ), "value is '%s' instead of Test", value );
- ok( !strcmp( data, "foobar" ), "data is '%s' instead of foobar", data );
+ ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res );
+ ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count );
+ ok( data_count == 7, "data_count set to %ld instead of 7\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !strcmp( value, "Test" ), "value is '%s' instead of Test\n", value );
+ ok( !strcmp( data, "foobar" ), "data is '%s' instead of foobar\n", data );
/* Unicode tests */
@@ -153,7 +153,7 @@
res = RegSetValueExW( hkey_main, testW, 0, REG_SZ, (BYTE *)foobarW, 7*sizeof(WCHAR) );
if (res==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
goto CLEANUP;
- ok( res == 0, "RegSetValueExW failed error %ld", res );
+ ok( res == 0, "RegSetValueExW failed error %ld\n", res );
/* overflow both name and data */
val_count = 2;
@@ -162,12 +162,12 @@
memcpy( valueW, xxxW, sizeof(xxxW) );
memcpy( dataW, xxxW, sizeof(xxxW) );
res = RegEnumValueW( hkey_main, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 2, "val_count set to %ld", val_count );
- ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified" );
- ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified" );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 2, "val_count set to %ld\n", val_count );
+ ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified\n" );
+ ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" );
/* overflow name */
val_count = 3;
@@ -176,12 +176,12 @@
memcpy( valueW, xxxW, sizeof(xxxW) );
memcpy( dataW, xxxW, sizeof(xxxW) );
res = RegEnumValueW( hkey_main, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 3, "val_count set to %ld", val_count );
- ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified" );
- ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified" );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 3, "val_count set to %ld\n", val_count );
+ ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified\n" );
+ ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" );
/* overflow data */
val_count = 20;
@@ -190,12 +190,12 @@
memcpy( valueW, xxxW, sizeof(xxxW) );
memcpy( dataW, xxxW, sizeof(xxxW) );
res = RegEnumValueW( hkey_main, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count );
- ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld", res );
- ok( val_count == 4, "val_count set to %ld instead of 4", val_count );
- ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'" );
- ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified" );
+ ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %ld\n", res );
+ ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count );
+ ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'\n" );
+ ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" );
/* no overflow */
val_count = 20;
@@ -204,12 +204,12 @@
memcpy( valueW, xxxW, sizeof(xxxW) );
memcpy( dataW, xxxW, sizeof(xxxW) );
res = RegEnumValueW( hkey_main, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count );
- ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld", res );
- ok( val_count == 4, "val_count set to %ld instead of 4", val_count );
- ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)", data_count );
- ok( type == REG_SZ, "type %ld is not REG_SZ", type );
- ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'" );
- ok( !memcmp( dataW, foobarW, sizeof(foobarW) ), "data is not 'foobar'" );
+ ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", res );
+ ok( val_count == 4, "val_count set to %ld instead of 4\n", val_count );
+ ok( data_count == 7*sizeof(WCHAR), "data_count set to %ld instead of 7*sizeof(WCHAR)\n", data_count );
+ ok( type == REG_SZ, "type %ld is not REG_SZ\n", type );
+ ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'\n" );
+ ok( !memcmp( dataW, foobarW, sizeof(foobarW) ), "data is not 'foobar'\n" );
CLEANUP:
/* cleanup */
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
f u kn rd ts, ur wy 2 gky 4 ur wn gd.
More information about the wine-patches
mailing list