diff options
author | Dan Albert <danalbert@google.com> | 2014-07-30 10:53:48 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-07-30 17:09:46 -0700 |
commit | 1aec7c1a35b2d03038b194967d5ebdc8e2c24b80 (patch) | |
tree | 977211860df02be4f4c0843cf231ec6c3da88ee6 /tests/stdio_test.cpp | |
parent | 0f7ed163cf6c1fe6d71a1d7e5fb6d0989213be85 (diff) |
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
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r-- | tests/stdio_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |