summaryrefslogtreecommitdiff
path: root/regress/unittests/conversion/tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/conversion/tests.c')
-rw-r--r--regress/unittests/conversion/tests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regress/unittests/conversion/tests.c b/regress/unittests/conversion/tests.c
index 6dd77ef4..ae1154d4 100644
--- a/regress/unittests/conversion/tests.c
+++ b/regress/unittests/conversion/tests.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tests.c,v 1.1 2017/03/14 01:20:29 dtucker Exp $ */
+/* $OpenBSD: tests.c,v 1.2 2019/06/14 04:03:48 djm Exp $ */
/*
* Regress test for conversions
*
@@ -40,6 +40,8 @@ tests(void)
ASSERT_LONG_EQ(convtime("-9d"), -1);
/* overflow */
+ snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX);
+ ASSERT_LONG_EQ(convtime(buf), -1);
snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1);
ASSERT_LONG_EQ(convtime(buf), -1);