Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ec0e9b3b
Commit
ec0e9b3b
authored
Feb 17, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f9b9df0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
Makefile.in
programs/cmd/tests/Makefile.in
+0
-1
batch.c
programs/cmd/tests/batch.c
+12
-12
No files found.
programs/cmd/tests/Makefile.in
View file @
ec0e9b3b
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
cmd.exe
C_SRCS
=
\
...
...
programs/cmd/tests/batch.c
View file @
ec0e9b3b
...
...
@@ -92,7 +92,7 @@ static BOOL run_cmd(const char *cmd_data, DWORD cmd_size)
bres
=
WriteFile
(
file
,
cmd_data
,
cmd_size
,
&
size
,
NULL
);
CloseHandle
(
file
);
ok
(
bres
,
"Could not write to file: %u
\n
"
,
GetLastError
());
ok
(
bres
,
"Could not write to file: %
l
u
\n
"
,
GetLastError
());
if
(
!
bres
)
return
FALSE
;
...
...
@@ -112,7 +112,7 @@ static BOOL run_cmd(const char *cmd_data, DWORD cmd_size)
si
.
hStdOutput
=
file
;
si
.
hStdError
=
fileerr
;
bres
=
CreateProcessA
(
NULL
,
command
,
NULL
,
NULL
,
TRUE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
bres
,
"CreateProcess failed: %u
\n
"
,
GetLastError
());
ok
(
bres
,
"CreateProcess failed: %
l
u
\n
"
,
GetLastError
());
if
(
!
bres
)
{
DeleteFileA
(
"test.out"
);
return
FALSE
;
...
...
@@ -133,7 +133,7 @@ static DWORD map_file(const char *file_name, const char **ret)
DWORD
size
;
file
=
CreateFileA
(
file_name
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_READONLY
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile failed: %08x
\n
"
,
GetLastError
());
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile failed: %08
l
x
\n
"
,
GetLastError
());
if
(
file
==
INVALID_HANDLE_VALUE
)
return
0
;
...
...
@@ -141,12 +141,12 @@ static DWORD map_file(const char *file_name, const char **ret)
map
=
CreateFileMappingA
(
file
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
CloseHandle
(
file
);
ok
(
map
!=
NULL
,
"CreateFileMappingA(%s) failed: %u
\n
"
,
file_name
,
GetLastError
());
ok
(
map
!=
NULL
,
"CreateFileMappingA(%s) failed: %
l
u
\n
"
,
file_name
,
GetLastError
());
if
(
!
map
)
return
0
;
*
ret
=
MapViewOfFile
(
map
,
FILE_MAP_READ
,
0
,
0
,
0
);
ok
(
*
ret
!=
NULL
,
"MapViewOfFile failed: %u
\n
"
,
GetLastError
());
ok
(
*
ret
!=
NULL
,
"MapViewOfFile failed: %
l
u
\n
"
,
GetLastError
());
CloseHandle
(
map
);
if
(
!*
ret
)
return
0
;
...
...
@@ -307,10 +307,10 @@ static void test_output(const char *out_data, DWORD out_size, const char *exp_da
err
=
compare_line
(
out_ptr
,
out_nl
,
exp_ptr
,
exp_nl
);
if
(
err
==
out_nl
)
ok
(
0
,
"unexpected end of line %d (got '%.*s', wanted '%.*s')
\n
"
,
ok
(
0
,
"unexpected end of line %
l
d (got '%.*s', wanted '%.*s')
\n
"
,
line
,
(
int
)(
out_nl
-
out_ptr
),
out_ptr
,
(
int
)(
exp_nl
-
exp_ptr
),
exp_ptr
);
else
if
(
err
==
exp_nl
)
ok
(
0
,
"excess characters on line %d (got '%.*s', wanted '%.*s')
\n
"
,
ok
(
0
,
"excess characters on line %
l
d (got '%.*s', wanted '%.*s')
\n
"
,
line
,
(
int
)(
out_nl
-
out_ptr
),
out_ptr
,
(
int
)(
exp_nl
-
exp_ptr
),
exp_ptr
);
else
if
(
!
err
&&
is_todo_wine
&&
is_out_resync
&&
is_exp_resync
)
/* Consider that the todo_wine was to deal with extra lines,
...
...
@@ -318,7 +318,7 @@ static void test_output(const char *out_data, DWORD out_size, const char *exp_da
*/
err
=
NULL
;
else
ok
(
!
err
,
"unexpected char 0x%x position %d in line %d (got '%.*s', wanted '%.*s')
\n
"
,
ok
(
!
err
,
"unexpected char 0x%x position %d in line %
l
d (got '%.*s', wanted '%.*s')
\n
"
,
(
err
?
*
err
:
0
),
(
err
?
(
int
)(
err
-
out_ptr
)
:
-
1
),
line
,
(
int
)(
out_nl
-
out_ptr
),
out_ptr
,
(
int
)(
exp_nl
-
exp_ptr
),
exp_ptr
);
}
...
...
@@ -344,7 +344,7 @@ static void test_output(const char *out_data, DWORD out_size, const char *exp_da
}
}
ok
(
exp_ptr
>=
exp_data
+
exp_size
,
"unexpected end of output in line %d, missing %s
\n
"
,
line
,
exp_ptr
);
ok
(
exp_ptr
>=
exp_data
+
exp_size
,
"unexpected end of output in line %
l
d, missing %s
\n
"
,
line
,
exp_ptr
);
ok
(
out_ptr
>=
out_data
+
out_size
,
"too long output, got additional %s
\n
"
,
out_ptr
);
}
...
...
@@ -380,14 +380,14 @@ static void run_from_file(const char *file_name)
test_size
=
map_file
(
file_name
,
&
test_data
);
if
(
!
test_size
)
{
ok
(
0
,
"Could not map file %s: %u
\n
"
,
file_name
,
GetLastError
());
ok
(
0
,
"Could not map file %s: %
l
u
\n
"
,
file_name
,
GetLastError
());
return
;
}
sprintf
(
out_name
,
"%s.exp"
,
file_name
);
out_size
=
map_file
(
out_name
,
&
out_data
);
if
(
!
out_size
)
{
ok
(
0
,
"Could not map file %s: %u
\n
"
,
out_name
,
GetLastError
());
ok
(
0
,
"Could not map file %s: %
l
u
\n
"
,
out_name
,
GetLastError
());
UnmapViewOfFile
(
test_data
);
return
;
}
...
...
@@ -405,7 +405,7 @@ static DWORD load_resource(const char *name, const char *type, const char **ret)
DWORD
size
;
src
=
FindResourceA
(
NULL
,
name
,
type
);
ok
(
src
!=
NULL
,
"Could not find resource %s: %u
\n
"
,
name
,
GetLastError
());
ok
(
src
!=
NULL
,
"Could not find resource %s: %
l
u
\n
"
,
name
,
GetLastError
());
if
(
!
src
)
return
0
;
...
...
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