Mercurial > hg > octave-kai > gnulib-hg
changeset 11590:3a0825087a5c
tests/test-strstr.c: Add another self-test.
author | Simon Josefsson <simon@josefsson.org> |
---|---|
date | Tue, 26 May 2009 14:14:51 +0200 |
parents | 62a14720580a |
children | 8864003db422 |
files | ChangeLog tests/test-strstr.c |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-05-26 Simon Josefsson <simon@josefsson.org> + + * tests/test-strstr.c: Add another self-test. + 2009-05-23 Bruno Haible <bruno@clisp.org> * doc/havelib.texi (AC_LIB_HAVE_LINKFLAGS): Update for 2009-04-26
--- a/tests/test-strstr.c +++ b/tests/test-strstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007, 2008 Free Software Foundation + * Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation * Written by Bruno Haible and Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -61,6 +61,14 @@ } { + /* See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 */ + char *input = strdup ("aBaaaaaaaaaaax"); + const char *result = strstr (input, "B1x"); + ASSERT (result == NULL); + free (input); + } + + { const char input[] = "ABC ABCDAB ABCDABCDABDE"; const char *result = strstr (input, "ABCDABD"); ASSERT (result == input + 15);