From 407a57d531e963220c2366545986a3d1d34e3030 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 4 Jul 2011 11:52:26 -0400 Subject: additional printf corner case tests --- snprintf.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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" }, -- cgit v1.2.1