authorgravatar for kris.tate+github@gmail.comkristopher tate <kris.tate+github@gmail.com> 2018-09-02 15:04:57+09:00
committergravatar for kris.tate+github@gmail.comkristopher tate <kris.tate+github@gmail.com> 2018-09-02 15:04:57+09:00
logd1752fbdc0d778fa92e97510f868ebbee5137329
tree7c7ab14a8b8543a3571ce3d226712da0c333e261
parent48d3fbef5c3eb0c146979d3156c094fb23f45e8e

std/fmt/index.zig: test for printing double width hex bytes with zeros;

Co-Authored-By: Shawn Landden <shawn@git.icu>

1 files changed, 2 insertions(+), 0 deletions(-)

std/fmt/index.zig+2
...@@ -1281,6 +1281,8 @@ test "fmt.format" {...@@ -1281,6 +1281,8 @@ test "fmt.format" {
1281 const some_bytes = "\xCA\xFE\xBA\xBE";1281 const some_bytes = "\xCA\xFE\xBA\xBE";
1282 try testFmt("lowercase: cafebabe\n", "lowercase: {x}\n", some_bytes);1282 try testFmt("lowercase: cafebabe\n", "lowercase: {x}\n", some_bytes);
1283 try testFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", some_bytes);1283 try testFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", some_bytes);
1284 const bytes_with_zeros = "\x00\x0E\xBA\xBE";
1285 try testFmt("lowercase: 000ebabe\n", "lowercase: {x}\n", bytes_with_zeros);
1284 }1286 }
1285}1287}
12861288