summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-07-04 11:52:26 -0400
committerRich Felker <dalias@aerifal.cx>2011-07-04 11:52:26 -0400
commit407a57d531e963220c2366545986a3d1d34e3030 (patch)
tree559a2079e64f79dbad6aca6b2aa205299ec3f6dd
parentad056d9aa0ce3a04e85504a357581d54930594d8 (diff)
downloadlibc-testsuite-407a57d531e963220c2366545986a3d1d34e3030.tar.gz
additional printf corner case tests
-rw-r--r--snprintf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/snprintf.c b/snprintf.c
index 1468974..115bbe2 100644
--- a/snprintf.c
+++ b/snprintf.c
@@ -37,6 +37,14 @@ static const struct {
{ "%#.0o", 0, "" },
{ "%#.0x", 0, "" },
+ /* ...but it still has to honor width and flags. */
+ { "%2.0u", 0, " " },
+ { "%02.0u", 0, "00" },
+ { "%2.0d", 0, " " },
+ { "%02.0d", 0, "00" },
+ { "% .0d", 0, " " },
+ { "%+.0d", 0, "+" },
+
/* hex: test alt form and case */
{ "%x", 63, "3f" },
{ "%#x", 63, "0x3f" },