1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-14 13:35:03 -05:00
curl/tests/data/test557
Jay Satiro 68701e51c1 mprintf: Fix processing of width and prec args
Prior to this change a width arg could be erroneously output, and also
width and precision args could not be used together without crashing.

"%0*d%s", 2, 9, "foo"

Before: "092"
After: "09foo"

"%*.*s", 5, 2, "foo"

Before: crash
After: "   fo"

Test 557 is updated to verify this and more
2016-05-13 00:06:50 +02:00

47 lines
714 B
Plaintext

<testcase>
<info>
<keywords>
printf
unittest
</keywords>
</info>
#
# Server-side
<reply>
</reply>
# Client-side
<client>
<server>
none
</server>
# tool is what to use instead of 'curl'
<tool>
lib557
</tool>
<name>
curl_mprintf() testing
</name>
<command>
nothing
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<stdout>
All curl_mprintf() unsigned short tests OK!
All curl_mprintf() signed short tests OK!
All curl_mprintf() unsigned int tests OK!
All curl_mprintf() signed int tests OK!
All curl_mprintf() unsigned long tests OK!
All curl_mprintf() signed long tests OK!
All curl_mprintf() curl_off_t tests OK!
All curl_mprintf() strings tests OK!
</stdout>
</verify>
</testcase>