33static WCHAR filenameW [] = {
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
'.',
'x',
'x',
'x',0};
34static WCHAR filenameW_[] = {
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
'.',
'x',
'x',
'_',0};
48static WCHAR _terminatedW [] = {
'_',
't',
'e',
'r',
'm',
'i',
'n',
'a',
't',
'e',
'd',
'.',
'x',
'x',
'x',
'x',
'_', 0};
49static WCHAR _terminatedW_[] = {
'_',
't',
'e',
'r',
'm',
'i',
'n',
'a',
't',
'e',
'd',
'.',
'x',
'x',
'x',
'x',
'_', 0};
60 {0x53,0x5A,0x44,0x44,0x88,0xF0,0x27,0x33,0x41,
61 0x74,0x75,0x14,0x00,0x00,0xDF,0x54,0x68,0x69,
62 0x73,0x20,0xF2,0xF0,0x61,0x20,0xFF,0x74,0x65,
63 0x73,0x74,0x20,0x66,0x69,0x6C,0x03,0x65,0x2E};
77 ok(retval > 0,
"GetCurrentDirectoryA returned %d, GLE=%d\n",
79 if(
dst[retval-1] !=
'\\')
87 ok(retval > 0,
"GetShortPathNameA returned %d for '%s', GLE=%d\n",
99 ok(
file >= 0,
"LZOpenFileA failed to create '%s'\n", fname);
112 ok(
file >= 0,
"LZOpenFileA failed to delete '%s'\n", fname);
143 ok(
file >= 0,
"LZOpenFileA returns negative file descriptor for '%s'\n",
filename);
145 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
146 ok(
test.nErrCode == 0,
"LZOpenFileA set test.nErrCode to %d\n",
149 "LZOpenFileA returned '%s', but was expected to return '%s'\n",
160 ok(
file >= 0,
"LZOpenFileA returns negative file descriptor for '%s'\n",
dotless);
162 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
163 ok(
test.nErrCode == 0,
"LZOpenFileA set test.nErrCode to %d\n",
166 "LZOpenFileA returned '%s', but was expected to return '%s'\n",
177 ok(
file >= 0,
"LZOpenFileA returns negative file descriptor for '%s'\n",
extless);
179 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
180 ok(
test.nErrCode == 0,
"LZOpenFileA set test.nErrCode to %d\n",
183 "LZOpenFileA returned '%s', but was expected to return '%s'\n",
194 ok(
file >= 0,
"LZOpenFileA failed on switching to a compressed file name\n");
195 ok(
test.cBytes ==
sizeof(
OFSTRUCT),
"LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
196 ok(
test.nErrCode == 0,
"LZOpenFileA set test.nErrCode to %d\n",
199 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
229 "LZOpenFileA succeeded on nonexistent file\n");
233 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
235 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
237 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
248 "LZOpenFileA succeeded on nonexistent file\n");
252 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
254 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
256 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
267 "LZOpenFileA succeeded on nonexistent file\n");
271 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
273 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
275 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
286 "LZOpenFileA succeeded on nonexistent file\n");
290 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
292 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
294 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
303 static char badfilename_[] =
"badfilename_";
311 "LZOpenFileA succeeded on nonexistent file\n");
321 ok(
file >= 0,
"LZOpenFileA failed on creation\n");
323 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
325 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
327 "LZOpenFileA returned '%s', but was expected to return '%s'\n",
341 ok(
file >= 0,
"LZOpenFileA failed on read\n");
343 "LZOpenFileA set test.cBytes to %d '%s'('%s')\n",
test.cBytes,
expected, short_expected);
345 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
347 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
355 ok(
file >= 0,
"LZOpenFileA failed on write\n");
357 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
359 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
361 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
369 ok(
file >= 0,
"LZOpenFileA failed on read/write\n");
371 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
373 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
375 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
383 ok(
file >= 0,
"LZOpenFileA failed on read/write\n");
385 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
387 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
389 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
397 ok(
file >= 0,
"LZOpenFileA failed on delete\n");
399 "LZOpenFileA set test.cBytes to %d\n",
test.cBytes);
401 "LZOpenFileA set test.nErrCode to %d\n",
test.nErrCode);
403 "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n",
409 "GetFileAttributesA succeeded on deleted file\n");
432 ok(
cfile > 0,
"LZOpenFileA failed\n");
439 "buffer contents mismatch\n");
471 ok(
source >= 0,
"LZOpenFileA failed on compressed file\n");
473 ok(
dest >= 0,
"LZOpenFileA failed on creating new file %d\n",
dest);
476 ok(
ret > 0,
"LZCopy error\n");
489 "buffer contents mismatch\n");
505 ok(
file >= 0,
"LZOpenFileW failed on creation\n");
518 ok(
file >= 0,
"LZOpenFileW failed on delete\n");
544 ok(
file >= 0,
"LZOpenFileW failed on switching to a compressed file name\n");
546 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
551 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
560 ok(
file >= 0,
"LZOpenFileW failed on switching to a compressed file name\n");
562 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
567 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
576 ok(
file >= 0,
"LZOpenFileW failed on switching to a compressed file name\n");
578 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
583 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
592 ok(
file >= 0,
"LZOpenFileW failed on switching to a compressed file name\n");
594 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
599 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
629 "LZOpenFileW succeeded on nonexistent file\n");
633 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
635 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
637 "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n",
648 "LZOpenFileW succeeded on nonexistent file\n");
652 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
654 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
656 "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n",
667 "LZOpenFileW succeeded on nonexistent file\n");
671 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
673 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
675 "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n",
686 "LZOpenFileW succeeded on nonexistent file\n");
690 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
692 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
694 "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n",
703 static WCHAR badfilenameW[] = {
'b',
'a',
'd',
'f',
'i',
'l',
'e',
'n',
'a',
'm',
'e',
'.',
'x',
't',
'n',0};
711 win_skip(
"LZOpenFileW call is not implemented\n");
724 ok(
file >= 0,
"LZOpenFile failed on creation\n");
726 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
728 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
730 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
743 ok(
file >= 0,
"LZOpenFileW failed on read\n");
745 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
747 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
749 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
757 ok(
file >= 0,
"LZOpenFileW failed on write\n");
759 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
761 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
763 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
771 ok(
file >= 0,
"LZOpenFileW failed on read/write\n");
773 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
775 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
777 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
785 ok(
file >= 0,
"LZOpenFileW failed on read/write\n");
787 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
789 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
791 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
799 ok(
file >= 0,
"LZOpenFileW failed on delete\n");
801 "LZOpenFileW set test.cBytes to %d\n",
test.cBytes);
803 "LZOpenFileW set test.nErrCode to %d\n",
test.nErrCode);
805 "LZOpenFileW returned '%s', but was expected to return '%s'\n",
811 "GetFileAttributesW succeeded on deleted file\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
GLenum GLuint GLenum GLsizei const GLchar * buf
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
INT WINAPI LZRead(HFILE fd, LPSTR vbuf, INT toread)
HFILE WINAPI LZOpenFileW(LPWSTR fn, LPOFSTRUCT ofs, WORD mode)
LONG WINAPI LZCopy(HFILE src, HFILE dest)
void WINAPI LZClose(HFILE fd)
HFILE WINAPI LZOpenFileA(LPSTR fn, LPOFSTRUCT ofs, WORD mode)
#define LZERROR_BADINHANDLE
static char _terminated[]
static void test_LZOpenFileA_nonexisting_compressed(void)
static void test_LZOpenFileA_existing_compressed(void)
static WCHAR _terminatedW_[]
static void test_LZOpenFileW_nonexisting_compressed(void)
static const DWORD compressed_file_size
static void delete_fileW(WCHAR *fnameW)
static void test_LZCopy(void)
static void test_LZOpenFileW_existing_compressed(void)
static const char uncompressed_data[]
static void test_LZRead(void)
static WCHAR filenameW_[]
static WCHAR _terminatedW[]
static const unsigned char compressed_file[]
static void test_LZOpenFileA(void)
static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect_short)
static void create_fileW(WCHAR *fnameW)
static void test_LZOpenFileW(void)
static const DWORD uncompressed_data_size
static char _terminated_[]
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
#define create_file(name, size)
CHAR szPathName[OFS_MAXPATHNAME]
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)