summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-06-20 14:10:00 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-06-20 14:10:00 +0000
commitdc3febb1594cc448ead4c2927beff0f4f79cb97d (patch)
tree33d68e1445238a6c8e25b4a92cd468aad3e5b828
parent9836e96b03db4e956ccbf88f2fe98641d1a0a9b9 (diff)
Add a test case for fmt_scaled.c r1.20
-rw-r--r--regress/lib/libutil/fmt_scaled/fmt_test.c4
1 files changed, 3 insertions, 1 deletions
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? */