kernel32/tests 2/2: Use skip for not implemented function.
This commit is contained in:
parent
4f86b5cd07
commit
35edd40f33
|
@ -227,31 +227,37 @@ static void test_profile_sections_names(void)
|
||||||
ok( ret == 25, "expected return size 25, got %d\n", ret );
|
ok( ret == 25, "expected return size 25, got %d\n", ret );
|
||||||
ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
|
ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
|
||||||
|
|
||||||
|
|
||||||
/* Test with sufficiently large buffer */
|
|
||||||
ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W );
|
|
||||||
ok( ret == 27, "expected return size 27, got %d\n", ret );
|
|
||||||
ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
|
|
||||||
|
|
||||||
/* Test with exactly fitting buffer */
|
|
||||||
ret = GetPrivateProfileSectionNamesW( bufW, 28, testfile3W );
|
|
||||||
ok( ret == 26, "expected return size 26, got %d\n", ret );
|
|
||||||
ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
|
|
||||||
|
|
||||||
/* Test with a buffer too small */
|
|
||||||
ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W );
|
|
||||||
ok( ret == 25, "expected return size 25, got %d\n", ret );
|
|
||||||
ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
|
|
||||||
|
|
||||||
DeleteFileA( testfile3 );
|
|
||||||
|
|
||||||
/* Tests on nonexistent file */
|
/* Tests on nonexistent file */
|
||||||
memset(buf, 0xcc, sizeof(buf));
|
memset(buf, 0xcc, sizeof(buf));
|
||||||
ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" );
|
ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" );
|
||||||
ok( ret == 0, "expected return size 0, got %d\n", ret );
|
ok( ret == 0, "expected return size 0, got %d\n", ret );
|
||||||
ok( buf[0] == 0, "returned buffer not terminated with null\n" );
|
ok( buf[0] == 0, "returned buffer not terminated with null\n" );
|
||||||
ok( buf[1] != 0, "returned buffer terminated with double-null\n" );
|
ok( buf[1] != 0, "returned buffer terminated with double-null\n" );
|
||||||
|
|
||||||
|
/* Test with sufficiently large buffer */
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W );
|
||||||
|
{
|
||||||
|
skip("GetPrivateProfileSectionNamesW is not implemented\n");
|
||||||
|
DeleteFileA( testfile3 );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ok( ret == 27, "expected return size 27, got %d\n", ret );
|
||||||
|
ok( bufW[ret-1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" );
|
||||||
|
|
||||||
|
/* Test with exactly fitting buffer */
|
||||||
|
ret = GetPrivateProfileSectionNamesW( bufW, 28, testfile3W );
|
||||||
|
ok( ret == 26, "expected return size 26, got %d\n", ret );
|
||||||
|
ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" );
|
||||||
|
|
||||||
|
/* Test with a buffer too small */
|
||||||
|
ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W );
|
||||||
|
ok( ret == 25, "expected return size 25, got %d\n", ret );
|
||||||
|
ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" );
|
||||||
|
|
||||||
|
DeleteFileA( testfile3 );
|
||||||
|
|
||||||
|
/* Tests on nonexistent file */
|
||||||
memset(bufW, 0xcc, sizeof(bufW));
|
memset(bufW, 0xcc, sizeof(bufW));
|
||||||
ret = GetPrivateProfileSectionNamesW( bufW, 10, not_here );
|
ret = GetPrivateProfileSectionNamesW( bufW, 10, not_here );
|
||||||
ok( ret == 0, "expected return size 0, got %d\n", ret );
|
ok( ret == 0, "expected return size 0, got %d\n", ret );
|
||||||
|
|
Loading…
Reference in New Issue