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
2ec955c9
Commit
2ec955c9
authored
May 13, 2003
by
Francois Gouget
Committed by
Alexandre Julliard
May 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the #include order so the test compiles with the MSVC headers.
Fix a few signed/unsigned warnings.
parent
617cf926
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
file.c
dlls/msvcrt/tests/file.c
+10
-11
path.c
dlls/shlwapi/tests/path.c
+2
-1
No files found.
dlls/msvcrt/tests/file.c
View file @
2ec955c9
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/
#include <windef.h>
#include "wine/test.h"
#include <winbase.h>
#include <winnls.h>
#include <winnls.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
...
@@ -26,8 +27,6 @@
...
@@ -26,8 +27,6 @@
#include <sys/stat.h>
#include <sys/stat.h>
#include <io.h>
#include <io.h>
#include "wine/test.h"
static
void
test_fdopen
(
void
)
static
void
test_fdopen
(
void
)
{
{
static
char
buffer
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
static
char
buffer
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
...
@@ -66,7 +65,7 @@ static void test_fgetwc( void )
...
@@ -66,7 +65,7 @@ static void test_fgetwc( void )
WCHAR
wtextW
[
LLEN
+
1
];
WCHAR
wtextW
[
LLEN
+
1
];
WCHAR
*
mytextW
=
NULL
,
*
aptr
,
*
wptr
;
WCHAR
*
mytextW
=
NULL
,
*
aptr
,
*
wptr
;
BOOL
diff_found
=
FALSE
;
BOOL
diff_found
=
FALSE
;
int
i
;
unsigned
int
i
;
tempf
=
_tempnam
(
"."
,
"wne"
);
tempf
=
_tempnam
(
"."
,
"wne"
);
tempfh
=
fopen
(
tempf
,
"wt"
);
/* open in TEXT mode */
tempfh
=
fopen
(
tempf
,
"wt"
);
/* open in TEXT mode */
...
@@ -98,7 +97,7 @@ static void test_file_put_get( void )
...
@@ -98,7 +97,7 @@ static void test_file_put_get( void )
WCHAR
wtextW
[
LLEN
+
1
];
WCHAR
wtextW
[
LLEN
+
1
];
WCHAR
*
mytextW
=
NULL
,
*
aptr
,
*
wptr
;
WCHAR
*
mytextW
=
NULL
,
*
aptr
,
*
wptr
;
BOOL
diff_found
=
FALSE
;
BOOL
diff_found
=
FALSE
;
int
i
;
unsigned
int
i
;
tempf
=
_tempnam
(
"."
,
"wne"
);
tempf
=
_tempnam
(
"."
,
"wne"
);
tempfh
=
fopen
(
tempf
,
"wt"
);
/* open in TEXT mode */
tempfh
=
fopen
(
tempf
,
"wt"
);
/* open in TEXT mode */
...
@@ -146,30 +145,30 @@ static void test_file_write_read( void )
...
@@ -146,30 +145,30 @@ static void test_file_write_read( void )
tempf
=
_tempnam
(
"."
,
"wne"
);
tempf
=
_tempnam
(
"."
,
"wne"
);
ok
((
tempfd
=
_open
(
tempf
,
_O_CREAT
|
_O_TRUNC
|
_O_TEXT
|
_O_RDWR
,
_S_IREAD
|
_S_IWRITE
))
!=
-
1
,
"Can't open"
);
/* open in TEXT mode */
ok
((
tempfd
=
_open
(
tempf
,
_O_CREAT
|
_O_TRUNC
|
_O_TEXT
|
_O_RDWR
,
_S_IREAD
|
_S_IWRITE
))
!=
-
1
,
"Can't open"
);
/* open in TEXT mode */
ok
(
_write
(
tempfd
,
mytext
,
strlen
(
mytext
))
==
strlen
(
mytext
),
"_write _O_TEXT bad return value"
);
ok
(
_write
(
tempfd
,
mytext
,
strlen
(
mytext
))
==
lstrlenA
(
mytext
),
"_write _O_TEXT bad return value"
);
_close
(
tempfd
);
_close
(
tempfd
);
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_BINARY
,
0
);
/* open in BINARY mode */
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_BINARY
,
0
);
/* open in BINARY mode */
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
strlen
(
dostext
),
"_read _O_BINARY got bad length"
);
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
lstrlenA
(
dostext
),
"_read _O_BINARY got bad length"
);
ok
(
memcmp
(
dostext
,
btext
,
strlen
(
dostext
))
==
0
,
"problems with _O_TEXT _write and _O_BINARY _write"
);
ok
(
memcmp
(
dostext
,
btext
,
strlen
(
dostext
))
==
0
,
"problems with _O_TEXT _write and _O_BINARY _write"
);
ok
(
btext
[
strlen
(
dostext
)
-
2
]
==
'\r'
,
"CR not written"
);
ok
(
btext
[
strlen
(
dostext
)
-
2
]
==
'\r'
,
"CR not written"
);
_close
(
tempfd
);
_close
(
tempfd
);
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_TEXT
);
/* open in TEXT mode */
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_TEXT
);
/* open in TEXT mode */
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
strlen
(
mytext
),
"_read _O_TEXT got bad length"
);
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
lstrlenA
(
mytext
),
"_read _O_TEXT got bad length"
);
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_TEXT _write / _write"
);
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_TEXT _write / _write"
);
_close
(
tempfd
);
_close
(
tempfd
);
ok
(
unlink
(
tempf
)
!=-
1
,
"Can't unlink"
);
ok
(
unlink
(
tempf
)
!=-
1
,
"Can't unlink"
);
tempf
=
_tempnam
(
"."
,
"wne"
);
tempf
=
_tempnam
(
"."
,
"wne"
);
ok
((
tempfd
=
_open
(
tempf
,
_O_CREAT
|
_O_TRUNC
|
_O_BINARY
|
_O_RDWR
,
0
))
!=
-
1
,
"Can't open %s"
,
tempf
);
/* open in BINARY mode */
ok
((
tempfd
=
_open
(
tempf
,
_O_CREAT
|
_O_TRUNC
|
_O_BINARY
|
_O_RDWR
,
0
))
!=
-
1
,
"Can't open %s"
,
tempf
);
/* open in BINARY mode */
ok
(
_write
(
tempfd
,
dostext
,
strlen
(
dostext
))
==
strlen
(
dostext
),
"_write _O_TEXT bad return value"
);
ok
(
_write
(
tempfd
,
dostext
,
strlen
(
dostext
))
==
lstrlenA
(
dostext
),
"_write _O_TEXT bad return value"
);
_close
(
tempfd
);
_close
(
tempfd
);
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_BINARY
,
0
);
/* open in BINARY mode */
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_BINARY
,
0
);
/* open in BINARY mode */
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
strlen
(
dostext
),
"_read _O_BINARY got bad length"
);
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
lstrlenA
(
dostext
),
"_read _O_BINARY got bad length"
);
ok
(
memcmp
(
dostext
,
btext
,
strlen
(
dostext
))
==
0
,
"problems with _O_TEXT _write and _O_BINARY _write"
);
ok
(
memcmp
(
dostext
,
btext
,
strlen
(
dostext
))
==
0
,
"problems with _O_TEXT _write and _O_BINARY _write"
);
ok
(
btext
[
strlen
(
dostext
)
-
2
]
==
'\r'
,
"CR not written"
);
ok
(
btext
[
strlen
(
dostext
)
-
2
]
==
'\r'
,
"CR not written"
);
_close
(
tempfd
);
_close
(
tempfd
);
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_TEXT
);
/* open in TEXT mode */
tempfd
=
_open
(
tempf
,
_O_RDONLY
|
_O_TEXT
);
/* open in TEXT mode */
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
strlen
(
mytext
),
"_read _O_TEXT got bad length"
);
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
lstrlenA
(
mytext
),
"_read _O_TEXT got bad length"
);
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_TEXT _write / _write"
);
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_TEXT _write / _write"
);
_close
(
tempfd
);
_close
(
tempfd
);
...
...
dlls/shlwapi/tests/path.c
View file @
2ec955c9
...
@@ -22,8 +22,9 @@
...
@@ -22,8 +22,9 @@
#include <stdio.h>
#include <stdio.h>
#include "wine/test.h"
#include "wine/test.h"
#include "wine/unicode.h"
#include "winbase.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shlwapi.h"
#include "wininet.h"
#include "wininet.h"
...
...
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