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

Co-Authored-By: Shawn Landden <shawn@git.icu>
This commit is contained in:
kristopher tate 2018-09-02 15:04:57 +09:00
parent 48d3fbef5c
commit d1752fbdc0

View File

@ -1281,6 +1281,8 @@ test "fmt.format" {
const some_bytes = "\xCA\xFE\xBA\xBE";
try testFmt("lowercase: cafebabe\n", "lowercase: {x}\n", some_bytes);
try testFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", some_bytes);
const bytes_with_zeros = "\x00\x0E\xBA\xBE";
try testFmt("lowercase: 000ebabe\n", "lowercase: {x}\n", bytes_with_zeros);
}
}