summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/strspn.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
commitf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (patch)
treeb259e5d585da0f8cde9579939a74d5ef44c72abd /test/sanitizer_common/TestCases/strspn.c
parentcd2dd3df15523e2be8d2bbace27641d6ac9fa40d (diff)
Notes
Diffstat (limited to 'test/sanitizer_common/TestCases/strspn.c')
-rw-r--r--test/sanitizer_common/TestCases/strspn.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/strspn.c b/test/sanitizer_common/TestCases/strspn.c
new file mode 100644
index 0000000000000..a9a24305c6f1d
--- /dev/null
+++ b/test/sanitizer_common/TestCases/strspn.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[] = "ab";
+ char s2[] = "ac";
+ r = strspn(s1, s2);
+ assert(r == 1);
+ return 0;
+}