aboutsummaryrefslogtreecommitdiff
path: root/string/test-strstr.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-10-05 13:30:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-10-05 13:32:27 -0700
commitd7e0dab96d1a855f7ff779195010c188c334669e (patch)
tree7ff4e149505a7a2a533fa18b54d33e20f95747ec /string/test-strstr.c
parent03759f47db62930f2dddf1c9733ef89b9d99e2da (diff)
downloadglibc-d7e0dab96d1a855f7ff779195010c188c334669e.zip
glibc-d7e0dab96d1a855f7ff779195010c188c334669e.tar.gz
glibc-d7e0dab96d1a855f7ff779195010c188c334669e.tar.bz2
Add a testase for BZ #14602
Diffstat (limited to 'string/test-strstr.c')
-rw-r--r--string/test-strstr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/string/test-strstr.c b/string/test-strstr.c
index e7d8e73..1aebd35 100644
--- a/string/test-strstr.c
+++ b/string/test-strstr.c
@@ -156,12 +156,24 @@ check1 (void)
check_result (impl, s1, s2, exp_result);
}
+static void
+check2 (void)
+{
+ const char s1[] = ", enable_static, \0, enable_shared, ";
+ char *exp_result;
+
+ exp_result = stupid_strstr (s1, s1 + 18);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1, s1 + 18, exp_result);
+}
+
static int
test_main (void)
{
test_init ();
check1 ();
+ check2 ();
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)