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
b9758443
Commit
b9758443
authored
Nov 21, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Nov 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor MSVCRT test changes:
- add two invalid parameter checks for fopen(), - rearrange test sequence into two parts (low-level and stream I/O), - break long line.
parent
70dd2d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
file.c
dlls/msvcrt/tests/file.c
+16
-5
No files found.
dlls/msvcrt/tests/file.c
View file @
b9758443
...
@@ -411,7 +411,7 @@ static void test_fopen_fclose_fcloseall( void )
...
@@ -411,7 +411,7 @@ static void test_fopen_fclose_fcloseall( void )
char
fname1
[]
=
"empty1"
;
char
fname1
[]
=
"empty1"
;
char
fname2
[]
=
"empty2"
;
char
fname2
[]
=
"empty2"
;
char
fname3
[]
=
"empty3"
;
char
fname3
[]
=
"empty3"
;
FILE
*
stream1
,
*
stream2
,
*
stream3
;
FILE
*
stream1
,
*
stream2
,
*
stream3
,
*
stream4
;
int
ret
,
numclosed
;
int
ret
,
numclosed
;
/* testing fopen() */
/* testing fopen() */
...
@@ -424,6 +424,14 @@ static void test_fopen_fclose_fcloseall( void )
...
@@ -424,6 +424,14 @@ static void test_fopen_fclose_fcloseall( void )
ok
(
stream3
==
NULL
,
"The file '%s' shouldn't exist before
\n
"
,
fname3
);
ok
(
stream3
==
NULL
,
"The file '%s' shouldn't exist before
\n
"
,
fname3
);
stream3
=
fopen
(
fname3
,
"w+"
);
stream3
=
fopen
(
fname3
,
"w+"
);
ok
(
stream3
!=
NULL
,
"The file '%s' should be opened now
\n
"
,
fname3
);
ok
(
stream3
!=
NULL
,
"The file '%s' should be opened now
\n
"
,
fname3
);
errno
=
0xfaceabad
;
stream4
=
fopen
(
""
,
"w+"
);
ok
(
stream4
==
NULL
&&
errno
==
ENOENT
,
"filename is empty, errno = %d (expected 2)
\n
"
,
errno
);
errno
=
0xfaceabad
;
stream4
=
fopen
(
NULL
,
"w+"
);
ok
(
stream4
==
NULL
&&
(
errno
==
EINVAL
||
errno
==
ENOENT
),
"filename is NULL, errno = %d (expected 2 or 22)
\n
"
,
errno
);
/* testing fclose() */
/* testing fclose() */
ret
=
fclose
(
stream2
);
ret
=
fclose
(
stream2
);
...
@@ -454,19 +462,22 @@ START_TEST(file)
...
@@ -454,19 +462,22 @@ START_TEST(file)
arg_c
=
winetest_get_mainargs
(
&
arg_v
);
arg_c
=
winetest_get_mainargs
(
&
arg_v
);
/* testing low-level I/O */
if
(
arg_c
>=
3
)
if
(
arg_c
>=
3
)
{
{
if
(
arg_c
==
3
)
test_file_inherit_child
(
arg_v
[
2
]);
else
test_file_inherit_child_no
(
arg_v
[
2
]);
if
(
arg_c
==
3
)
test_file_inherit_child
(
arg_v
[
2
]);
else
test_file_inherit_child_no
(
arg_v
[
2
]);
return
;
return
;
}
}
test_file_inherit
(
arg_v
[
0
]);
test_file_write_read
();
test_chsize
();
/* testing stream I/O */
test_fdopen
();
test_fdopen
();
test_fopen_fclose_fcloseall
();
test_fopen_fclose_fcloseall
();
test_fileops
();
test_fileops
();
test_fgetwc
();
test_fgetwc
();
test_file_put_get
();
test_file_put_get
();
test_file_write_read
();
test_file_inherit
(
arg_v
[
0
]);
test_tmpnam
();
test_tmpnam
();
test_chsize
();
}
}
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