| ... | ... | @@ -248,6 +248,11 @@ pub fn formatIntValue( |
| 248 | 248 | return formatAsciiChar(value, context, Errors, output); |
| 249 | 249 | } |
| 250 | 250 | }, |
| 251 | 'b' => { |
| 252 | radix = 2; |
| 253 | uppercase = false; |
| 254 | width = 0; |
| 255 | }, |
| 251 | 256 | 'd' => { |
| 252 | 257 | radix = 10; |
| 253 | 258 | uppercase = false; |
| ... | ... | @@ -874,6 +879,10 @@ test "fmt.format" { |
| 874 | 879 | const value: u8 = 'a'; |
| 875 | 880 | try testFmt("u8: a\n", "u8: {c}\n", value); |
| 876 | 881 | } |
| 882 | { |
| 883 | const value: u8 = 0b1100; |
| 884 | try testFmt("u8: 0b1100\n", "u8: 0b{b}\n", value); |
| 885 | } |
| 877 | 886 | { |
| 878 | 887 | const value: [3]u8 = "abc"; |
| 879 | 888 | try testFmt("array: abc\n", "array: {}\n", value); |