aboutsummaryrefslogtreecommitdiffstats
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-06-09 15:16:32 -0700
committerElliott Hughes <enh@google.com>2016-06-09 15:16:32 -0700
commit20788aec002ab3f6dea4e01665a439933161d11c (patch)
treecb77d4d956f2377e762476a96cfe92b4dcaf6a94 /tests/stdio_test.cpp
parent70d99a1053542b8c062e6cb7eca2bcfb16c25d55 (diff)
downloadandroid_bionic-20788aec002ab3f6dea4e01665a439933161d11c.tar.gz
android_bionic-20788aec002ab3f6dea4e01665a439933161d11c.tar.bz2
android_bionic-20788aec002ab3f6dea4e01665a439933161d11c.zip
Add ctermid.
Change-Id: I7c7c815c2725df222932db923632c8b6419741ab
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 7e826124f..4db1f72dd 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -1297,3 +1297,11 @@ TEST(STDIO_TEST, fseek_fseeko_EINVAL) {
fclose(fp);
}
+
+TEST(STDIO_TEST, ctermid) {
+ ASSERT_STREQ("/dev/tty", ctermid(nullptr));
+
+ char buf[L_ctermid] = {};
+ ASSERT_EQ(buf, ctermid(buf));
+ ASSERT_STREQ("/dev/tty", buf);
+}