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
02fb99e6
Commit
02fb99e6
authored
Jul 01, 2008
by
Peter Oberndorfer
Committed by
Alexandre Julliard
Jul 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add a test for scanf %p.
parent
c0661fdb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
scanf.c
dlls/msvcrt/tests/scanf.c
+29
-0
No files found.
dlls/msvcrt/tests/scanf.c
View file @
02fb99e6
...
...
@@ -28,6 +28,7 @@ static void test_sscanf( void )
char
format
[
20
];
int
result
,
ret
;
char
c
;
void
*
ptr
;
float
res1
=
-
82
.
6267
f
,
res2
=
27
.
76
f
,
res11
,
res12
;
static
const
char
pname
[]
=
" St. Petersburg, Florida
\n
"
;
int
hour
=
21
,
min
=
59
,
sec
=
20
;
...
...
@@ -39,6 +40,34 @@ static void test_sscanf( void )
ret
=
sscanf
(
buffer
,
"%d"
,
&
result
);
ok
(
ret
==
EOF
,
"sscanf returns %x instead of %x
\n
"
,
ret
,
EOF
);
/* check %p */
todo_wine
{
ok
(
sscanf
(
"000000000046F170"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x46F170
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x46F170
);
ok
(
sscanf
(
"0046F171"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x46F171
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x46F171
);
ok
(
sscanf
(
"46F172"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x46F172
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x46F172
);
ok
(
sscanf
(
"0x46F173"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0
);
ok
(
sscanf
(
"-46F174"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0xFFB90E8C
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0xFFB90E8C
);
ok
(
sscanf
(
"+46F175"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x46F175
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x46F175
);
/* check %p with no hex digits */
ok
(
sscanf
(
"1233"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x1233
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x1233
);
ok
(
sscanf
(
"1234"
,
"%P"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x1234
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x1234
);
}
/* check %x */
strcpy
(
buffer
,
"0x519"
);
ok
(
sscanf
(
buffer
,
"%x"
,
&
result
)
==
1
,
"sscanf failed
\n
"
);
...
...
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