mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 14:41:43 +01:00
fix zero flag for char types and make zero flag ignored if a precision is specified
This commit is contained in:
committed by
Victor Zverovich
parent
bc1b89da26
commit
8c8f74a870
@@ -139,8 +139,11 @@ TEST(PrintfTest, ZeroFlag) {
|
||||
|
||||
EXPECT_PRINTF("+00042", "%00+6d", 42);
|
||||
|
||||
EXPECT_PRINTF(" 42", "%05.d", 42);
|
||||
EXPECT_PRINTF(" 0042", "%05.4d", 42);
|
||||
|
||||
// '0' flag is ignored for non-numeric types.
|
||||
EXPECT_PRINTF("0000x", "%05c", 'x');
|
||||
EXPECT_PRINTF(" x", "%05c", 'x');
|
||||
}
|
||||
|
||||
TEST(PrintfTest, PlusFlag) {
|
||||
|
||||
Reference in New Issue
Block a user