From 1aec7c1a35b2d03038b194967d5ebdc8e2c24b80 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 30 Jul 2014 10:53:48 -0700 Subject: Proper MB_CUR_MAX. Previously this was hard coded to 4. This is only the case for UTF-8 locales. As a side effect, this properly reports C.UTF-8 as the default locale instead of C. Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc --- tests/stdio_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/stdio_test.cpp') diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp index 18dae9c2f..bb86509c2 100644 --- a/tests/stdio_test.cpp +++ b/tests/stdio_test.cpp @@ -427,6 +427,9 @@ TEST(stdio, snprintf_negative_zero_5084292) { } TEST(stdio, snprintf_utf8_15439554) { + locale_t cloc = newlocale(LC_ALL, "C.UTF-8", 0); + uselocale(cloc); + // http://b/15439554 char buf[BUFSIZ]; @@ -442,6 +445,8 @@ TEST(stdio, snprintf_utf8_15439554) { // 4-byte character. snprintf(buf, sizeof(buf), "%d\xf0\xa4\xad\xa2%d", 1, 2); EXPECT_STREQ("1𤭢2", buf); + + freelocale(cloc); } TEST(stdio, fprintf_failures_7229520) { -- cgit v1.2.3