kernel32: Use a kernel error code.

This commit is contained in:
Dmitry Timoshkov 2008-09-11 12:55:09 +09:00 committed by Alexandre Julliard
parent 73569a95c1
commit 4d672ba090
1 changed files with 2 additions and 1 deletions

View File

@ -183,13 +183,14 @@ static void test_profile_sections(void)
ok( GetLastError() == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
/* And a real one */
SetLastError(0xdeadbeef);
ret=GetPrivateProfileSectionA("section1", buf, sizeof(buf), testfile4);
for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1)
p[-1] = ',';
ok( ret == 35 && !strcmp( buf, "name1=val1,name2=,name3,name4=val4"), "wrong section returned(%d): %s\n",
ret, buf);
ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" );
ok( GetLastError() == S_OK, "expected S_OK, got %d\n", GetLastError());
ok( GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", GetLastError());
DeleteFileA( testfile4 );
}