diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-10-06 16:04:56 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-10-06 16:04:56 -0700 |
commit | 5d41d91a3e819098c7b5730dfbafb4dd74c61817 (patch) | |
tree | d42fd92f4c779ef03c1ab57652bcf797adb88be3 /string | |
parent | f07621646892e079b4d1eec1b02e5ab03b578a5e (diff) | |
download | glibc-5d41d91a3e819098c7b5730dfbafb4dd74c61817.zip glibc-5d41d91a3e819098c7b5730dfbafb4dd74c61817.tar.gz glibc-5d41d91a3e819098c7b5730dfbafb4dd74c61817.tar.bz2 |
Add a strstr test for page boundary
Diffstat (limited to 'string')
-rw-r--r-- | string/test-strstr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/string/test-strstr.c b/string/test-strstr.c index 1aebd35..d4c0efc 100644 --- a/string/test-strstr.c +++ b/string/test-strstr.c @@ -161,10 +161,15 @@ check2 (void) { const char s1[] = ", enable_static, \0, enable_shared, "; char *exp_result; + char *s2 = (void *) buf1 + page_size - 18; + strcpy (s2, s1); exp_result = stupid_strstr (s1, s1 + 18); FOR_EACH_IMPL (impl, 0) - check_result (impl, s1, s1 + 18, exp_result); + { + check_result (impl, s1, s1 + 18, exp_result); + check_result (impl, s2, s1 + 18, exp_result); + } } static int |