From: tb Date: Sun, 20 Jun 2021 14:09:59 +0000 (+0000) Subject: Add a test case for fmt_scaled.c r1.20 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=29ce58298f6c6f4df1a1081cca30a8f32c74279e;p=openbsd Add a test case for fmt_scaled.c r1.20 --- diff --git a/regress/lib/libutil/fmt_scaled/fmt_test.c b/regress/lib/libutil/fmt_scaled/fmt_test.c index fd9d1c81bfb..f35c4451407 100644 --- a/regress/lib/libutil/fmt_scaled/fmt_test.c +++ b/regress/lib/libutil/fmt_scaled/fmt_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt_test.c,v 1.16 2020/02/14 19:17:34 schwarze Exp $ */ +/* $OpenBSD: fmt_test.c,v 1.17 2021/06/20 14:09:59 tb Exp $ */ /* * Combined tests for fmt_scaled and scan_scaled. @@ -169,6 +169,8 @@ struct { /* the test cases */ { "-2K", -2048LL, 0 }, /* negatives */ { "-2.2K", -2252LL, 0 }, /* neg with fract */ { "4.5k", 4608, 0 }, + { "3.333755555555t", 3665502936412, 0 }, + { "-3.333755555555t", -3665502936412, 0 }, { "4.5555555555555555K", 4664, 0 }, { "4.5555555555555555555K", 4664, 0 }, /* handle enough digits? */ { "4.555555555555555555555555555555K", 4664, 0 }, /* ignores extra digits? */