xref: /relibc/tests/wchar/wcscspn.c (revision be35961d82cd98f2a2e61c4f1869271b9f4af571)
1 #include <assert.h>
2 #include <wchar.h>
3 
4 int main(void) {
5 
6     assert(wcscspn(L"", L"") == 0);
7     assert(wcscspn(L"", L"h") == 0);
8     assert(wcscspn(L"a", L"a") == 0);
9 
10     assert(wcscspn(L"ba", L"ab") == 0);
11     assert(wcscspn(L"ba", L"a") == 1);
12 
13     assert(wcscspn(L"abcdefghijkl$\"£$%", L"zxqrst,./$w") == 12);
14 
15     return 0;
16 }
17