diff options
Diffstat (limited to 'test/sanitizer_common/TestCases/strcspn.c')
-rw-r--r-- | test/sanitizer_common/TestCases/strcspn.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/strcspn.c b/test/sanitizer_common/TestCases/strcspn.c new file mode 100644 index 000000000000..066a27bbdf2c --- /dev/null +++ b/test/sanitizer_common/TestCases/strcspn.c @@ -0,0 +1,13 @@ +// RUN: %clang %s -o %t && %run %t 2>&1 + +#include <assert.h> +#include <string.h> + +int main(int argc, char **argv) { + size_t r; + char s1[] = "ad"; + char s2[] = "cd"; + r = strcspn(s1, s2); + assert(r == 1); + return 0; +} |