Correctly format '%c' when given a width. #2199

This commit is contained in:
Christoffer Lerno
2025-06-15 02:27:36 +02:00
parent dda2d2ecbe
commit 2afa544d7d
3 changed files with 15 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
module string_test;
fn void test_format() @test
{
test::eq(string::tformat("_%*c_", 5, 'x'), "_ x_");
test::eq(string::tformat("_%-*c_", 5, 'x'), "_x _");
}
fn void test_clear() @test
{
DString s = dstring::new_with_capacity(mem, 32);