summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Posix/fputs_puts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/sanitizer_common/TestCases/Posix/fputs_puts.cpp')
-rw-r--r--test/sanitizer_common/TestCases/Posix/fputs_puts.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/fputs_puts.cpp b/test/sanitizer_common/TestCases/Posix/fputs_puts.cpp
new file mode 100644
index 000000000..21bb93aa4
--- /dev/null
+++ b/test/sanitizer_common/TestCases/Posix/fputs_puts.cpp
@@ -0,0 +1,12 @@
+// RUN: %clangxx -g %s -o %t && %run %t | FileCheck %s
+// CHECK: {{^foobar$}}
+
+#include <assert.h>
+#include <stdio.h>
+
+int main(void) {
+ assert(fputs("foo", stdout) >= 0);
+ assert(puts("bar") >= 0);
+
+ return 0;
+}