diff --git a/src/stdio/snprintf.c b/src/stdio/snprintf.c index ce92c1a..3f28237 100644 --- a/src/stdio/snprintf.c +++ b/src/stdio/snprintf.c @@ -67,10 +67,16 @@ static const struct { const char *expect; } fp_tests[] = { /* basic form, handling of exponent/precision for 0 */ + { "%a", 0.0, "0x0p+0" }, { "%e", 0.0, "0.000000e+00" }, { "%f", 0.0, "0.000000" }, { "%g", 0.0, "0" }, { "%#g", 0.0, "0.00000" }, + { "%la", 0.0, "0x0p+0" }, + { "%le", 0.0, "0.000000e+00" }, + { "%lf", 0.0, "0.000000" }, + { "%lg", 0.0, "0" }, + { "%#lg", 0.0, "0.00000" }, /* rounding */ { "%f", 1.1, "1.100000" }, @@ -81,6 +87,7 @@ static const struct { { "%.4f", 1.06125, "1.0612" }, { "%.2f", 1.375, "1.38" }, { "%.1f", 1.375, "1.4" }, + { "%.1lf", 1.375, "1.4" }, { "%.15f", 1.1, "1.100000000000000" }, { "%.16f", 1.1, "1.1000000000000001" }, { "%.17f", 1.1, "1.10000000000000009" },