summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 6dd77ef42..ae1154d42 100644
--- a/regress/unittests/conversion/tests.c
+++ b/regress/unittests/conversion/tests.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tests.c,v 1.1 2017/03/14 01:20:29 dtucker Exp $ */ 1/* $OpenBSD: tests.c,v 1.2 2019/06/14 04:03:48 djm Exp $ */
2/* 2/*
3 * Regress test for conversions 3 * Regress test for conversions
4 * 4 *
@@ -40,6 +40,8 @@ tests(void)
40 ASSERT_LONG_EQ(convtime("-9d"), -1); 40 ASSERT_LONG_EQ(convtime("-9d"), -1);
41 41
42 /* overflow */ 42 /* overflow */
43 snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX);
44 ASSERT_LONG_EQ(convtime(buf), -1);
43 snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1); 45 snprintf(buf, sizeof buf, "%llu", (unsigned long long)LONG_MAX + 1);
44 ASSERT_LONG_EQ(convtime(buf), -1); 46 ASSERT_LONG_EQ(convtime(buf), -1);
45 47