flockfile list corruption test
[libc-test.git] / src / regression / wcsstr-false-negative.c
blob7283472f4f0c0343c015fb43d85b5213c693da8f
1 // commit 476cd1d96560aaf7f210319597556e7fbcd60469 2014-04-18
2 // wcsstr (strstr and memmem) failed to match repetitive needles in some cases
3 #include <wchar.h>
4 #include "test.h"
6 int main(int argc, char* argv[])
8 wchar_t const *haystack = L"playing play play play always";
9 wchar_t const *needle = L"play play play";
10 wchar_t *p = wcsstr(haystack, needle);
11 if (p != haystack+8)
12 t_error("wcsstr(L\"%S\",L\"%S\") failed: got %p, want %p\n", haystack, needle, p, haystack+8);
13 return t_status;