sync lz32 winetest to wine 1.1.11

svn path=/trunk/; revision=38414
This commit is contained in:
Christoph von Wittich 2008-12-28 11:24:41 +00:00
parent 8fccb16c05
commit 7222acc172

View file

@ -230,7 +230,8 @@ static void test_LZOpenFileA_existing_compressed(void)
/* d, using underscore-terminated file name. */ /* d, using underscore-terminated file name. */
file = LZOpenFileA(_terminated, &test, OF_EXIST); file = LZOpenFileA(_terminated, &test, OF_EXIST);
ok(file >= 0, "LZOpenFileA failed on switching to a compressed file name\n"); ok(file >= 0, "LZOpenFileA failed on switching to a compressed file name\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n", ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode); test.nErrCode);
@ -370,7 +371,7 @@ static void test_LZOpenFileA(void)
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT),
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS || ok(test.nErrCode == ERROR_SUCCESS ||
test.nErrCode == ERROR_FILE_NOT_FOUND, /* win9x */ broken(test.nErrCode != ERROR_SUCCESS), /* win9x */
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
ok(lstrcmpA(test.szPathName, expected) == 0, ok(lstrcmpA(test.szPathName, expected) == 0,
"LZOpenFileA returned '%s', but was expected to return '%s'\n", "LZOpenFileA returned '%s', but was expected to return '%s'\n",
@ -388,7 +389,8 @@ static void test_LZOpenFileA(void)
/* a, for reading. */ /* a, for reading. */
file = LZOpenFileA(filename_, &test, OF_READ); file = LZOpenFileA(filename_, &test, OF_READ);
ok(file >= 0, "LZOpenFileA failed on read\n"); ok(file >= 0, "LZOpenFileA failed on read\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS, ok(test.nErrCode == ERROR_SUCCESS,
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
@ -403,7 +405,8 @@ static void test_LZOpenFileA(void)
/* b, for writing. */ /* b, for writing. */
file = LZOpenFileA(filename_, &test, OF_WRITE); file = LZOpenFileA(filename_, &test, OF_WRITE);
ok(file >= 0, "LZOpenFileA failed on write\n"); ok(file >= 0, "LZOpenFileA failed on write\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS, ok(test.nErrCode == ERROR_SUCCESS,
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
@ -418,7 +421,8 @@ static void test_LZOpenFileA(void)
/* c, for reading and writing. */ /* c, for reading and writing. */
file = LZOpenFileA(filename_, &test, OF_READWRITE); file = LZOpenFileA(filename_, &test, OF_READWRITE);
ok(file >= 0, "LZOpenFileA failed on read/write\n"); ok(file >= 0, "LZOpenFileA failed on read/write\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS, ok(test.nErrCode == ERROR_SUCCESS,
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
@ -433,7 +437,8 @@ static void test_LZOpenFileA(void)
/* d, for checking file existence. */ /* d, for checking file existence. */
file = LZOpenFileA(filename_, &test, OF_EXIST); file = LZOpenFileA(filename_, &test, OF_EXIST);
ok(file >= 0, "LZOpenFileA failed on read/write\n"); ok(file >= 0, "LZOpenFileA failed on read/write\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS, ok(test.nErrCode == ERROR_SUCCESS,
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
@ -448,7 +453,8 @@ static void test_LZOpenFileA(void)
/* Delete the file then make sure it doesn't exist anymore. */ /* Delete the file then make sure it doesn't exist anymore. */
file = LZOpenFileA(filename_, &test, OF_DELETE); file = LZOpenFileA(filename_, &test, OF_DELETE);
ok(file >= 0, "LZOpenFileA failed on delete\n"); ok(file >= 0, "LZOpenFileA failed on delete\n");
ok(test.cBytes == sizeof(OFSTRUCT), ok(test.cBytes == sizeof(OFSTRUCT) ||
broken(test.cBytes == 40), /* win95 */
"LZOpenFileA set test.cBytes to %d\n", test.cBytes); "LZOpenFileA set test.cBytes to %d\n", test.cBytes);
ok(test.nErrCode == ERROR_SUCCESS, ok(test.nErrCode == ERROR_SUCCESS,
"LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode);
@ -764,13 +770,13 @@ static void test_LZOpenFileW(void)
SetLastError(0xfaceabee); SetLastError(0xfaceabee);
/* Check for nonexistent file. */ /* Check for nonexistent file. */
file = LZOpenFileW(badfilenameW, &test, OF_READ); file = LZOpenFileW(badfilenameW, &test, OF_READ);
ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED,
"GetLastError() returns %d\n", GetLastError());
if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{ {
trace("LZOpenFileW call not implemented, skipping rest of the test\n"); win_skip("LZOpenFileW call is not implemented\n");
return; return;
} }
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"GetLastError() returns %d\n", GetLastError());
ok(file == LZERROR_BADINHANDLE, "LZOpenFileW succeeded on nonexistent file\n"); ok(file == LZERROR_BADINHANDLE, "LZOpenFileW succeeded on nonexistent file\n");
LZClose(file); LZClose(file);