diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2016-06-09 23:21:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-06-09 23:21:22 +0000 |
commit | f3c39b26b5a152eb2f1713842d0346d53204894c (patch) | |
tree | 243a953b4f18b7c95707962f4be850936ffd164b /tests/stdio_test.cpp | |
parent | 4bc95c0f302d7bab1cb1927cf696516debd853f1 (diff) | |
parent | 20788aec002ab3f6dea4e01665a439933161d11c (diff) |
Merge "Add ctermid."
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r-- | tests/stdio_test.cpp | 8 |
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); +} |