summaryrefslogtreecommitdiff
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-04-11 13:54:48 -0700
committerElliott Hughes <enh@google.com>2013-04-11 13:55:01 -0700
commit6b05c8e28017518fae04a3a601d0d245916561d2 (patch)
tree91e24656267091edeeff1c171f20d635d2503c38 /tests/stdio_test.cpp
parentb632857a50a1fd2b759316d07ace6c36f6f418cf (diff)
Start moving to current FreeBSD stdio.
This only touches the easy stuff. Change-Id: Iecee57f1681dba5c56bff59f0e9a89811a71f0ca
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 4b5a1f953..2e779d81c 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -193,3 +193,21 @@ TEST(stdio, popen) {
ASSERT_EQ(0, pclose(fp));
}
+
+TEST(stdio, getc) {
+ FILE* fp = fopen("/proc/version", "r");
+ ASSERT_TRUE(fp != NULL);
+ ASSERT_EQ('L', getc(fp));
+ ASSERT_EQ('i', getc(fp));
+ ASSERT_EQ('n', getc(fp));
+ ASSERT_EQ('u', getc(fp));
+ ASSERT_EQ('x', getc(fp));
+ fclose(fp);
+}
+
+TEST(stdio, putc) {
+ FILE* fp = fopen("/proc/version", "r");
+ ASSERT_TRUE(fp != NULL);
+ ASSERT_EQ(EOF, putc('x', fp));
+ fclose(fp);
+}