Commit 98bfe9c6 authored by Saulius Krasuckas's avatar Saulius Krasuckas Committed by Alexandre Julliard

lz32/tests: Non-op cosmetics for LZOpenFile[AW] operations.

parent dbe8adf2
...@@ -363,16 +363,23 @@ static void test_LZOpenFileA(void) ...@@ -363,16 +363,23 @@ static void test_LZOpenFileA(void)
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %ld\n", ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %ld\n",
GetLastError()); GetLastError());
/* Check various opening options. */ /* Check various opening options: */
/* 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");
LZClose(file); LZClose(file);
/* 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");
LZClose(file); LZClose(file);
/* 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");
LZClose(file); LZClose(file);
/* d, for checking file existance. */
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");
LZClose(file); LZClose(file);
...@@ -456,8 +463,7 @@ static void test_LZCopy(void) ...@@ -456,8 +463,7 @@ static void test_LZCopy(void)
LZClose(source); LZClose(source);
LZClose(dest); LZClose(dest);
file = CreateFileA(filename2, GENERIC_READ, 0, NULL, OPEN_EXISTING, file = CreateFileA(filename2, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
0, 0);
ok(file != INVALID_HANDLE_VALUE, ok(file != INVALID_HANDLE_VALUE,
"CreateFileA: error %ld\n", GetLastError()); "CreateFileA: error %ld\n", GetLastError());
...@@ -695,28 +701,35 @@ static void test_LZOpenFileW(void) ...@@ -695,28 +701,35 @@ static void test_LZOpenFileW(void)
trace("LZOpenFileW call not implemented, skipping rest of the test\n"); trace("LZOpenFileW call not implemented, skipping rest of the test\n");
return; return;
} }
ok(file == LZERROR_BADINHANDLE, ok(file == LZERROR_BADINHANDLE, "LZOpenFileW succeeded on nonexistent file\n");
"LZOpenFileW succeeded on nonexistent file\n");
LZClose(file); LZClose(file);
/* Create an empty file. */ /* Create an empty file. */
file = LZOpenFileW(filenameW_, &test, OF_CREATE); file = LZOpenFileW(filenameW_, &test, OF_CREATE);
ok(file >= 0, "LZOpenFile failed on creation\n"); ok(file >= 0, "LZOpenFile failed on creation\n");
LZClose(file); LZClose(file);
retval = GetFileAttributesW(filenameW_); retval = GetFileAttributesW(filenameW_);
ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n", ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n",
GetLastError()); GetLastError());
/* Check various opening options. */ /* Check various opening options: */
/* a, for reading. */
file = LZOpenFileW(filenameW_, &test, OF_READ); file = LZOpenFileW(filenameW_, &test, OF_READ);
ok(file >= 0, "LZOpenFileW failed on read\n"); ok(file >= 0, "LZOpenFileW failed on read\n");
LZClose(file); LZClose(file);
/* b, for writing. */
file = LZOpenFileW(filenameW_, &test, OF_WRITE); file = LZOpenFileW(filenameW_, &test, OF_WRITE);
ok(file >= 0, "LZOpenFileW failed on write\n"); ok(file >= 0, "LZOpenFileW failed on write\n");
LZClose(file); LZClose(file);
/* c, for reading and writing. */
file = LZOpenFileW(filenameW_, &test, OF_READWRITE); file = LZOpenFileW(filenameW_, &test, OF_READWRITE);
ok(file >= 0, "LZOpenFileW failed on read/write\n"); ok(file >= 0, "LZOpenFileW failed on read/write\n");
LZClose(file); LZClose(file);
/* d, for checking file existance. */
file = LZOpenFileW(filenameW_, &test, OF_EXIST); file = LZOpenFileW(filenameW_, &test, OF_EXIST);
ok(file >= 0, "LZOpenFileW failed on read/write\n"); ok(file >= 0, "LZOpenFileW failed on read/write\n");
LZClose(file); LZClose(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment