Yury Gribov | 0ca65fd | 2015-05-28 09:24:33 +0000 | [diff] [blame] | 1 | // RUN: %clang %s -o %t && %run %t 2>&1 |
2 | |||||
3 | #include <assert.h> | ||||
4 | #include <string.h> | ||||
5 | |||||
6 | int main(int argc, char **argv) { | ||||
7 | size_t r; | ||||
8 | char s1[] = "ad"; | ||||
9 | char s2[] = "cd"; | ||||
10 | r = strcspn(s1, s2); | ||||
11 | assert(r == 1); | ||||
12 | return 0; | ||||
13 | } |