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
9c3dcdfb
Commit
9c3dcdfb
authored
Jan 30, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add more tests for printf format specifiers.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6656933d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
string.c
dlls/ntdll/tests/string.c
+22
-1
No files found.
dlls/ntdll/tests/string.c
View file @
9c3dcdfb
...
...
@@ -1349,7 +1349,28 @@ static void test__snprintf(void)
memset
(
buffer
,
0x7c
,
sizeof
(
buffer
));
res
=
p__snprintf
(
buffer
,
3
,
"test"
);
ok
(
res
==
-
1
,
"res = %d
\n
"
,
res
);
}
res
=
p__snprintf
(
buffer
,
sizeof
(
buffer
),
"%I64x %d"
,
(
ULONGLONG
)
0x1234567890
,
1
);
ok
(
res
==
strlen
(
buffer
),
"wrong size %d
\n
"
,
res
);
ok
(
!
strcmp
(
buffer
,
"1234567890 1"
),
"got %s
\n
"
,
debugstr_a
(
buffer
));
res
=
p__snprintf
(
buffer
,
sizeof
(
buffer
),
"%I32x %d"
,
0x123456
,
1
);
ok
(
res
==
strlen
(
buffer
),
"wrong size %d
\n
"
,
res
);
ok
(
!
strcmp
(
buffer
,
"123456 1"
),
"got %s
\n
"
,
debugstr_a
(
buffer
));
if
(
sizeof
(
void
*
)
==
8
)
{
res
=
p__snprintf
(
buffer
,
sizeof
(
buffer
),
"%Ix %d"
,
(
ULONG_PTR
)
0x1234567890
,
1
);
ok
(
res
==
strlen
(
buffer
),
"wrong size %d
\n
"
,
res
);
todo_wine
ok
(
!
strcmp
(
buffer
,
"1234567890 1"
),
"got %s
\n
"
,
debugstr_a
(
buffer
));
}
else
{
res
=
p__snprintf
(
buffer
,
sizeof
(
buffer
),
"%Ix %d"
,
(
ULONG_PTR
)
0x123456
,
1
);
ok
(
res
==
strlen
(
buffer
),
"wrong size %d
\n
"
,
res
);
ok
(
!
strcmp
(
buffer
,
"123456 1"
),
"got %s
\n
"
,
debugstr_a
(
buffer
));
}
}
static
void
test__snprintf_s
(
void
)
{
...
...
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