summaryrefslogtreecommitdiff
path: root/string/tester.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-01-31 08:43:22 +0000
committerJakub Jelinek <jakub@redhat.com>2008-01-31 08:43:22 +0000
commita21d44637e4c53cce4760a2e2b13f0213c49a33d (patch)
treee28730f085cf343d98da117b41773940b365dd37 /string/tester.c
parent07b7d301cc62d3f4ff1bbaf668ddc2510f7a55d8 (diff)
Updated to fedora-glibc-20080131T0821cvs/fedora-glibc-2_7_90-4
Diffstat (limited to 'string/tester.c')
-rw-r--r--string/tester.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/string/tester.c b/string/tester.c
index cccef3ad9d..1c0efe07d4 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1,5 +1,5 @@
/* Tester for string functions.
- Copyright (C) 1995-2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2001, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -840,9 +840,13 @@ test_strtok_r (void)
equal(strtok_r((char *)NULL, ",", &cp), "c", 29);
check(strtok_r((char *)NULL, ",", &cp) == NULL, 30);
equal(one+6, "gh", 31); /* Stomped past end? */
- equal(one, "a", 32); /* Stomped old tokens? */
+ equal(one, "a", 32); /* Stomped old tokens? */
equal(one+2, "b", 33);
equal(one+4, "c", 34);
+ strcpy (one, ":::");
+ cp = NULL;
+ check (strtok_r (one, ":", &cp) == NULL, 35); /* Must store pointer in cp. */
+ check (strtok_r (NULL, ":", &cp) == NULL, 36);
}
static void