Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8c7d53a5
Commit
8c7d53a5
authored
Feb 23, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ab27b548
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
39 deletions
+38
-39
Makefile.in
dlls/cabinet/tests/Makefile.in
+0
-1
extract.c
dlls/cabinet/tests/extract.c
+11
-11
fdi.c
dlls/cabinet/tests/fdi.c
+27
-27
No files found.
dlls/cabinet/tests/Makefile.in
View file @
8c7d53a5
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
cabinet.dll
IMPORTS
=
cabinet
...
...
dlls/cabinet/tests/extract.c
View file @
8c7d53a5
...
...
@@ -379,7 +379,7 @@ static void test_Extract(void)
session
.
Operation
=
EXTRACT_FILLFILELIST
|
EXTRACT_EXTRACTFILES
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -410,7 +410,7 @@ static void test_Extract(void)
session
.
Operation
=
EXTRACT_FILLFILELIST
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -435,7 +435,7 @@ static void test_Extract(void)
session
.
Operation
=
EXTRACT_EXTRACTFILES
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -463,7 +463,7 @@ static void test_Extract(void)
/* Extract does not extract files if the dest dir does not exist */
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -496,7 +496,7 @@ static void test_Extract(void)
CreateDirectoryA
(
"dest"
,
NULL
);
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -524,7 +524,7 @@ static void test_Extract(void)
session
.
FileList
=
NULL
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -550,7 +550,7 @@ static void test_Extract(void)
session
.
Operation
=
0
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -576,7 +576,7 @@ static void test_Extract(void)
session
.
FilterList
=
session
.
FileList
;
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %
l
d
\n
"
,
res
);
ok
(
session
.
FileSize
==
40
,
"Expected 40, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_NONE
,
"Expected FDIERROR_NONE, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -610,7 +610,7 @@ static void test_Extract(void)
res
=
pExtract
(
&
session
,
"nonexistent.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x
\n
"
,
res
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08
l
x
\n
"
,
res
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_CABINET_NOT_FOUND
,
"Expected FDIERROR_CABINET_NOT_FOUND, got %d
\n
"
,
session
.
Error
.
erfOper
);
ok
(
session
.
FileSize
==
0
,
"Expected 0, got %d
\n
"
,
session
.
FileSize
);
...
...
@@ -643,7 +643,7 @@ static void test_Extract(void)
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
HRESULT_FROM_WIN32
(
ERROR_ACCESS_DENIED
)
||
res
==
E_FAIL
,
"Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x
\n
"
,
res
);
"Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08
l
x
\n
"
,
res
);
ok
(
session
.
FileSize
==
6
,
"Expected 6, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_USER_ABORT
,
"Expected FDIERROR_USER_ABORT, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
@@ -681,7 +681,7 @@ static void test_Extract(void)
res
=
pExtract
(
&
session
,
"extract.cab"
);
node
=
session
.
FileList
;
ok
(
res
==
HRESULT_FROM_WIN32
(
ERROR_ACCESS_DENIED
)
||
res
==
E_FAIL
,
"Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x
\n
"
,
res
);
"Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08
l
x
\n
"
,
res
);
ok
(
session
.
FileSize
==
26
,
"Expected 26, got %d
\n
"
,
session
.
FileSize
);
ok
(
session
.
Error
.
erfOper
==
FDIERROR_USER_ABORT
,
"Expected FDIERROR_USER_ABORT, got %d
\n
"
,
session
.
Error
.
erfOper
);
...
...
dlls/cabinet/tests/fdi.c
View file @
8c7d53a5
...
...
@@ -190,7 +190,7 @@ static INT_PTR CDECL fdi_open_static(char *pszFile, int oflag, int pmode)
static
UINT
CDECL
fdi_read_static
(
INT_PTR
hf
,
void
*
pv
,
UINT
cb
)
{
ok
(
hf
==
0
,
"unexpected hf %
l
x
\n
"
,
hf
);
ok
(
hf
==
0
,
"unexpected hf %
I
x
\n
"
,
hf
);
return
fdi_read
(
static_fdi_handle
,
pv
,
cb
);
}
...
...
@@ -208,7 +208,7 @@ static int CDECL fdi_close_static(INT_PTR hf)
static
LONG
CDECL
fdi_seek_static
(
INT_PTR
hf
,
LONG
dist
,
int
seektype
)
{
ok
(
hf
==
0
,
"unexpected hf %
l
x
\n
"
,
hf
);
ok
(
hf
==
0
,
"unexpected hf %
I
x
\n
"
,
hf
);
return
fdi_seek
(
static_fdi_handle
,
dist
,
seektype
);
}
...
...
@@ -233,7 +233,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0x1abe11ed
,
"Expected 0x1abe11ed, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0x5eed1e55
,
"Expected 0x5eed1e55, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0x1ead1e55
,
"Expected 0x1ead1e55, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -250,7 +250,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -266,7 +266,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -282,7 +282,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -298,7 +298,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -314,7 +314,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -330,7 +330,7 @@ static void test_FDICreate(void)
cpuUNKNOWN
,
NULL
);
/* XP sets hfdi to a non-NULL value, but Vista sets it to NULL! */
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
/* NULL is passed to FDICreate instead of &erf, so don't retest the erf member values. */
FDIDestroy
(
hfdi
);
...
...
@@ -345,7 +345,7 @@ static void test_FDICreate(void)
0xcafebabe
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
((
erf
.
erfOper
==
0x1abe11ed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0x1abe11ed or 0, got %d
\n
"
,
erf
.
erfOper
);
ok
((
erf
.
erfType
==
0x5eed1e55
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0x5eed1e55 or 0, got %d
\n
"
,
erf
.
erfType
);
ok
((
erf
.
fError
==
0x1ead1e55
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0x1ead1e55 or 0, got %d
\n
"
,
erf
.
fError
);
...
...
@@ -365,7 +365,7 @@ static void test_FDICreate(void)
"Expected FDIERROR_ALLOC_FAIL, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
fError
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
erf
.
fError
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
(
erf
.
erfType
==
0
,
"Expected 0, got %d
\n
"
,
erf
.
erfType
);
}
...
...
@@ -668,8 +668,8 @@ static void test_FDIIsCabinet(void)
ret
=
FDIIsCabinet
(
hfdi
,
-
1
,
&
cabinfo
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cbCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cbCabinet
);
"Expected ERROR_INVALID_HANDLE, got %
l
d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cbCabinet
==
0
,
"Expected 0, got %
l
d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
cFiles
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cFiles
);
ok
(
cabinfo
.
cFolders
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cFolders
);
ok
(
cabinfo
.
iCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
iCabinet
);
...
...
@@ -683,8 +683,8 @@ static void test_FDIIsCabinet(void)
SetLastError
(
0xdeadbeef
);
ret
=
FDIIsCabinet
(
hfdi
,
fd
,
&
cabinfo
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cbCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cbCabinet
==
0
,
"Expected 0, got %
l
d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
cFiles
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cFiles
);
ok
(
cabinfo
.
cFolders
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
cFolders
);
ok
(
cabinfo
.
iCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
iCabinet
);
...
...
@@ -699,11 +699,11 @@ static void test_FDIIsCabinet(void)
SetLastError
(
0xdeadbeef
);
ret
=
FDIIsCabinet
(
hfdi
,
fd
,
&
cabinfo
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cFiles
==
4
,
"Expected 4, got %d
\n
"
,
cabinfo
.
cFiles
);
ok
(
cabinfo
.
cFolders
==
1
,
"Expected 1, got %d
\n
"
,
cabinfo
.
cFolders
);
ok
(
cabinfo
.
setID
==
0xbeef
,
"Expected 0xbeef, got %d
\n
"
,
cabinfo
.
setID
);
ok
(
cabinfo
.
cbCabinet
==
182
,
"Expected 182, got %d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
cbCabinet
==
182
,
"Expected 182, got %
l
d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
iCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
iCabinet
);
fdi_close
(
fd
);
...
...
@@ -720,11 +720,11 @@ static void test_FDIIsCabinet(void)
SetLastError
(
0xdeadbeef
);
ret
=
FDIIsCabinet
(
hfdi
,
0
,
&
cabinfo
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
GetLastError
());
ok
(
cabinfo
.
cFiles
==
4
,
"Expected 4, got %d
\n
"
,
cabinfo
.
cFiles
);
ok
(
cabinfo
.
cFolders
==
1
,
"Expected 1, got %d
\n
"
,
cabinfo
.
cFolders
);
ok
(
cabinfo
.
setID
==
0xbeef
,
"Expected 0xbeef, got %d
\n
"
,
cabinfo
.
setID
);
ok
(
cabinfo
.
cbCabinet
==
182
,
"Expected 182, got %d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
cbCabinet
==
182
,
"Expected 182, got %
l
d
\n
"
,
cabinfo
.
cbCabinet
);
ok
(
cabinfo
.
iCabinet
==
0
,
"Expected 0, got %d
\n
"
,
cabinfo
.
iCabinet
);
fdi_close
(
static_fdi_handle
);
...
...
@@ -778,9 +778,9 @@ static UINT CDECL fdi_mem_write(INT_PTR hf, void *pv, UINT cb)
{
static
const
char
expected
[]
=
"Hello World!"
;
trace
(
"mem_write(%#
l
x,%p,%u)
\n
"
,
hf
,
pv
,
cb
);
trace
(
"mem_write(%#
I
x,%p,%u)
\n
"
,
hf
,
pv
,
cb
);
ok
(
hf
==
0x12345678
,
"expected 0x12345678, got %#
l
x
\n
"
,
hf
);
ok
(
hf
==
0x12345678
,
"expected 0x12345678, got %#
I
x
\n
"
,
hf
);
ok
(
cb
==
12
,
"expected 12, got %u
\n
"
,
cb
);
ok
(
!
memcmp
(
pv
,
expected
,
12
),
"expected %s, got %s
\n
"
,
expected
,
(
const
char
*
)
pv
);
...
...
@@ -827,7 +827,7 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION *
switch
(
fdint
)
{
case
fdintCLOSE_FILE_INFO
:
trace
(
"mem_notify: CLOSE_FILE_INFO %s, handle %#
l
x
\n
"
,
info
->
psz1
,
info
->
hf
);
trace
(
"mem_notify: CLOSE_FILE_INFO %s, handle %#
I
x
\n
"
,
info
->
psz1
,
info
->
hf
);
ok
(
!
strcmp
(
info
->
psz1
,
expected
),
"expected %s, got %s
\n
"
,
expected
,
info
->
psz1
);
ok
(
info
->
date
==
0x1225
,
"expected 0x1225, got %#x
\n
"
,
info
->
date
);
...
...
@@ -838,9 +838,9 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION *
case
fdintCOPY_FILE
:
{
trace
(
"mem_notify: COPY_FILE %s, %d bytes
\n
"
,
info
->
psz1
,
info
->
cb
);
trace
(
"mem_notify: COPY_FILE %s, %
l
d bytes
\n
"
,
info
->
psz1
,
info
->
cb
);
ok
(
info
->
cb
==
12
,
"expected 12, got %u
\n
"
,
info
->
cb
);
ok
(
info
->
cb
==
12
,
"expected 12, got %
l
u
\n
"
,
info
->
cb
);
ok
(
!
strcmp
(
info
->
psz1
,
expected
),
"expected %s, got %s
\n
"
,
expected
,
info
->
psz1
);
ok
(
info
->
iFolder
==
0x1234
,
"expected 0x1234, got %#x
\n
"
,
info
->
iFolder
);
return
0x12345678
;
/* call write() callback */
...
...
@@ -893,7 +893,7 @@ static void test_FDICopy(void)
ret
=
FDICopy
(
hfdi
,
name
,
path
,
0
,
CopyProgress
,
NULL
,
0
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_HANDLE, got %
l
d
\n
"
,
GetLastError
());
FDIDestroy
(
hfdi
);
}
...
...
@@ -910,7 +910,7 @@ static void test_FDICopy(void)
SetLastError
(
0xdeadbeef
);
ret
=
FDICopy
(
hfdi
,
name
,
path
,
0
,
CopyProgress
,
NULL
,
0
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
0
,
"Expected 0f, got %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0
,
"Expected 0f, got %
l
d
\n
"
,
GetLastError
());
FDIDestroy
(
hfdi
);
...
...
@@ -927,7 +927,7 @@ static void test_FDICopy(void)
memset
(
&
info
,
0
,
sizeof
(
info
));
ret
=
FDIIsCabinet
(
hfdi
,
fd
,
&
info
);
ok
(
ret
,
"FDIIsCabinet error %d
\n
"
,
erf
.
erfOper
);
ok
(
info
.
cbCabinet
==
0x59
,
"expected 0x59, got %#x
\n
"
,
info
.
cbCabinet
);
ok
(
info
.
cbCabinet
==
0x59
,
"expected 0x59, got %#
l
x
\n
"
,
info
.
cbCabinet
);
ok
(
info
.
cFiles
==
1
,
"expected 1, got %d
\n
"
,
info
.
cFiles
);
ok
(
info
.
cFolders
==
1
,
"expected 1, got %d
\n
"
,
info
.
cFolders
);
ok
(
info
.
setID
==
0x1225
,
"expected 0x1225, got %#x
\n
"
,
info
.
setID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment