aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-07-08 16:32:55 +0000
committerUlrich Drepper <drepper@redhat.com>2008-07-08 16:32:55 +0000
commit75684bd7a8e660feeac0e8fa3464af8c190cf1f2 (patch)
tree78e9a40fc026f266df0b4273a5334d4ce7724f2a /stdio-common/tst-setvbuf1.c
parent[BZ #6719] (diff)
downloadglibc-75684bd7a8e660feeac0e8fa3464af8c190cf1f2.tar.gz
glibc-75684bd7a8e660feeac0e8fa3464af8c190cf1f2.tar.bz2
glibc-75684bd7a8e660feeac0e8fa3464af8c190cf1f2.zip
* stdio-common/Makefile: Add rules to build and run tst-setvbuf1.
* stdio-common/tst-setvbuf1.c: New file. * stdio-common/tst-setvbuf1.expect: New file.
Diffstat (limited to 'stdio-common/tst-setvbuf1.c')
-rw-r--r--stdio-common/tst-setvbuf1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/stdio-common/tst-setvbuf1.c b/stdio-common/tst-setvbuf1.c
new file mode 100644
index 0000000000..22410939c9
--- /dev/null
+++ b/stdio-common/tst-setvbuf1.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ if (setvbuf (stderr, NULL, _IOFBF, BUFSIZ) != 0)
+ {
+ puts ("Set full buffer error.");
+ return 1;
+ }
+
+ fprintf (stderr, "Output #1 <stderr>.\n");
+ printf ("Output #2 <stdout>.\n");
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"