From 7988979a722b4cdf287b2093956a76a3f19b9897 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Oct 2016 20:22:12 +0200 Subject: add uClibc-ng test directory --- test/string/bug-strpbrk1.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/string/bug-strpbrk1.c (limited to 'test/string/bug-strpbrk1.c') diff --git a/test/string/bug-strpbrk1.c b/test/string/bug-strpbrk1.c new file mode 100644 index 0000000..28238b0 --- /dev/null +++ b/test/string/bug-strpbrk1.c @@ -0,0 +1,19 @@ +/* Test case by Joseph S. Myers . */ +#undef __USE_STRING_INLINES +#define __USE_STRING_INLINES +#include +#include +#include + +int +main (void) +{ + const char *a = "abc"; + const char *b = a; + + strpbrk (b++, ""); + if (b != a + 1) + return 1; + + return 0; +} -- cgit v1.2.3