summaryrefslogtreecommitdiff
path: root/tests/stdio_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r--tests/stdio_test.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index d825c14ec..44ad76d80 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -220,11 +220,16 @@ TEST(stdio, snprintf_ls) {
}
TEST(stdio, snprintf_n) {
+#if !defined(__GLIBC__)
+ // http://b/14492135
char buf[32];
- int i = 0;
- EXPECT_EQ(4, snprintf(buf, sizeof(buf), "a %n b", &i));
- EXPECT_EQ(2, i);
- EXPECT_STREQ("a b", buf);
+ int i = 1234;
+ EXPECT_EQ(5, snprintf(buf, sizeof(buf), "a %n b", &i));
+ EXPECT_EQ(1234, i);
+ EXPECT_STREQ("a n b", buf);
+#else
+ GTEST_LOG_(INFO) << "This test does nothing.\n";
+#endif
}
TEST(stdio, snprintf_smoke) {