summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2017-07-15 17:08:26 +0000
committerjsing <>2017-07-15 17:08:26 +0000
commitaf3b67bd96b09e3317ac761a44d87f718bc54020 (patch)
tree1dd75ef029c34975b7cc4e48692ebdaa62441185 /src
parent37db74f19dd7a4d6588a1d2a7e609ef735fc54a4 (diff)
downloadopenbsd-af3b67bd96b09e3317ac761a44d87f718bc54020.tar.gz
openbsd-af3b67bd96b09e3317ac761a44d87f718bc54020.tar.bz2
openbsd-af3b67bd96b09e3317ac761a44d87f718bc54020.zip
Add a test that covers the recently fixed "0x" prefix handling issue.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libc/strtol/strtoltest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regress/lib/libc/strtol/strtoltest.c b/src/regress/lib/libc/strtol/strtoltest.c
index 17b73340ad..2efd7b3ad1 100644
--- a/src/regress/lib/libc/strtol/strtoltest.c
+++ b/src/regress/lib/libc/strtol/strtoltest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtoltest.c,v 1.3 2015/03/15 07:26:27 phessler Exp $ */ 1/* $OpenBSD: strtoltest.c,v 1.4 2017/07/15 17:08:26 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -42,6 +42,7 @@ struct strtol_test strtol_tests[] = {
42 {"-080000000", -2147483648L, '\0', 16, 0}, 42 {"-080000000", -2147483648L, '\0', 16, 0},
43 {"deadbeefdeadbeef", LONG_MAX, '\0', 16, ERANGE}, 43 {"deadbeefdeadbeef", LONG_MAX, '\0', 16, ERANGE},
44 {"deadzbeef", 57005L, 'z', 16, 0}, 44 {"deadzbeef", 57005L, 'z', 16, 0},
45 {"0xy", 0L, 'x', 16, 0},
45 {"-quitebigmchuge", LONG_MIN, '\0', 32, ERANGE}, 46 {"-quitebigmchuge", LONG_MIN, '\0', 32, ERANGE},
46 {"zzz", 46655L, '\0', 36, 0}, 47 {"zzz", 46655L, '\0', 36, 0},
47 {"1234567890", 0L, '1', 37, EINVAL}, 48 {"1234567890", 0L, '1', 37, EINVAL},