Fix handling of unsigned char strings in printf

This commit is contained in:
Victor Zverovich
2020-04-08 12:32:34 -07:00
parent 63b23e786a
commit 7d01859ef1
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -447,6 +447,12 @@ TEST(PrintfTest, String) {
EXPECT_PRINTF(L" (null)", L"%10s", null_wstr);
}
TEST(PrintfTest, UCharString) {
unsigned char str[] = "test";
unsigned char* pstr = str;
EXPECT_EQ("test", fmt::sprintf("%s", pstr));
}
TEST(PrintfTest, Pointer) {
int n;
void* p = &n;