aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libc_logging_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libc_logging_test.cpp')
-rw-r--r--tests/libc_logging_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/libc_logging_test.cpp b/tests/libc_logging_test.cpp
index 950161e78..ef39d1c03 100644
--- a/tests/libc_logging_test.cpp
+++ b/tests/libc_logging_test.cpp
@@ -176,3 +176,14 @@ TEST(libc_logging, lld_LLONG_MIN) {
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif // __BIONIC__
}
+
+TEST(libc_logging, m) {
+#if defined(__BIONIC__)
+ char buf[BUFSIZ];
+ errno = EBADF;
+ __libc_format_buffer(buf, sizeof(buf), "<%m>");
+ EXPECT_STREQ("<Bad file number>", buf);
+#else // __BIONIC__
+ GTEST_LOG_(INFO) << "This test does nothing.\n";
+#endif // __BIONIC__
+}