From d7e0dab96d1a855f7ff779195010c188c334669e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 5 Oct 2012 13:30:02 -0700 Subject: Add a testase for BZ #14602 --- string/test-strstr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'string') 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) -- cgit v1.1