mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
make fmt.formatAsciiChar respect options parameter
This commit is contained in:
parent
0be46866fe
commit
eaaaceaf3c
@ -1004,8 +1004,7 @@ pub fn formatAsciiChar(
|
||||
options: FormatOptions,
|
||||
writer: anytype,
|
||||
) !void {
|
||||
_ = options;
|
||||
return writer.writeAll(@as(*const [1]u8, &c));
|
||||
return formatBuf(@as(*const [1]u8, &c), options, writer);
|
||||
}
|
||||
|
||||
pub fn formatUnicodeCodepoint(
|
||||
@ -2724,6 +2723,9 @@ test "padding" {
|
||||
try expectFmt("==crêpe===", "{s:=^10}", .{"crêpe"});
|
||||
try expectFmt("=====crêpe", "{s:=>10}", .{"crêpe"});
|
||||
try expectFmt("crêpe=====", "{s:=<10}", .{"crêpe"});
|
||||
try expectFmt("====a", "{c:=>5}", .{'a'});
|
||||
try expectFmt("==a==", "{c:=^5}", .{'a'});
|
||||
try expectFmt("a====", "{c:=<5}", .{'a'});
|
||||
}
|
||||
|
||||
test "decimal float padding" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user