From 3f6966e7de746d7e9ff899f76e02a7af5a5e722e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 21 Oct 2012 23:32:05 -0400 Subject: add several tests that were lying around in my tree, and new stat() tests --- strtol.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'strtol.c') diff --git a/strtol.c b/strtol.c index 09af1c9..096d724 100644 --- a/strtol.c +++ b/strtol.c @@ -82,5 +82,11 @@ int test_strtol(void) TEST2(i, c-s, 0, "wrong final position %d != %d"); TEST2(i, errno, EINVAL, "%d != %d"); + TEST(l, strtol(s=" 15437", &c, 8), 015437, "%ld != %ld"); + TEST2(i, c-s, 7, "wrong final position %d != %d"); + + TEST(l, strtol(s=" 1", &c, 0), 1, "%ld != %ld"); + TEST2(i, c-s, 3, "wrong final position %d != %d"); + return err; } -- cgit v1.2.1