mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
AK+Format: Clean up format specifier parsing using GenericLexer.
Also adds support for replacement fields.
This commit is contained in:
parent
ebe1288aea
commit
6a2f5f4522
3 changed files with 165 additions and 134 deletions
|
@ -113,4 +113,9 @@ TEST_CASE(zero_pad)
|
|||
EXPECT_EQ(String::formatted("{:/^010}", 42), "////42////");
|
||||
}
|
||||
|
||||
TEST_CASE(replacement_field)
|
||||
{
|
||||
EXPECT_EQ(String::formatted("{:*>{1}}", 13, static_cast<size_t>(10)), "********13");
|
||||
}
|
||||
|
||||
TEST_MAIN(Format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue