summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2017-07-15 17:08:27 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2017-07-15 17:08:27 +0000
commitb6ddd3af2d5a8ecea0205f0e4d4e22fe08c2f218 (patch)
treec7697514defed72e606c52af300f773e9f3ea4ed /regress/lib
parent4cc894a126c49bf775d57243cbcdc9a2eaa42297 (diff)
Add a test that covers the recently fixed "0x" prefix handling issue.
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libc/strtol/strtoltest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regress/lib/libc/strtol/strtoltest.c b/regress/lib/libc/strtol/strtoltest.c
index 17b73340ad6..2efd7b3ad18 100644
--- a/regress/lib/libc/strtol/strtoltest.c
+++ b/regress/lib/libc/strtol/strtoltest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtoltest.c,v 1.3 2015/03/15 07:26:27 phessler Exp $ */
+/* $OpenBSD: strtoltest.c,v 1.4 2017/07/15 17:08:26 jsing Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
*
@@ -42,6 +42,7 @@ struct strtol_test strtol_tests[] = {
{"-080000000", -2147483648L, '\0', 16, 0},
{"deadbeefdeadbeef", LONG_MAX, '\0', 16, ERANGE},
{"deadzbeef", 57005L, 'z', 16, 0},
+ {"0xy", 0L, 'x', 16, 0},
{"-quitebigmchuge", LONG_MIN, '\0', 32, ERANGE},
{"zzz", 46655L, '\0', 36, 0},
{"1234567890", 0L, '1', 37, EINVAL},