diff --git a/single_file_tests/format.rs b/single_file_tests/format.rs index b21c3e9..a3b76c9 100644 --- a/single_file_tests/format.rs +++ b/single_file_tests/format.rs @@ -1,4 +1,6 @@ +// format: +// { [argument] ':' [[fill] align] [sign] ['#'] [width [$]] ['.' precision [$]] [type] } fn main() { let a = 1111111; @@ -8,4 +10,8 @@ fn main() { println!("octet: {:o}", a); println!("0x{:x}", a); println!("0x{:X}", a); + + println!("{0} {1}", "AA", "BB"); + println!("{a} {b}", a = "AA", b = "BB"); + println!("[{a:^6}] [{b:<6}] [{b:>6}] [{c:<10.3}]", a = "AA", b = "BB", c = 111.1); } \ No newline at end of file