diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-10-21 23:32:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-10-21 23:32:05 -0400 |
commit | 3f6966e7de746d7e9ff899f76e02a7af5a5e722e (patch) | |
tree | 28367a3916d335c221fe97a22587a8e93a2853f3 /strtol.c | |
parent | 5c3f746723830a15971577031086c3a0c801b44c (diff) | |
download | libc-testsuite-3f6966e7de746d7e9ff899f76e02a7af5a5e722e.tar.gz |
add several tests that were lying around in my tree, and new stat() tests
Diffstat (limited to 'strtol.c')
-rw-r--r-- | strtol.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; } |