aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorkristopher tate <kris.tate+github@gmail.com>2018-09-02 15:04:57 +0900
committerkristopher tate <kris.tate+github@gmail.com>2018-09-02 15:04:57 +0900
commitd1752fbdc0d778fa92e97510f868ebbee5137329 (patch)
tree7c7ab14a8b8543a3571ce3d226712da0c333e261 /std
parent48d3fbef5c3eb0c146979d3156c094fb23f45e8e (diff)
downloadzig-d1752fbdc0d778fa92e97510f868ebbee5137329.tar.gz
zig-d1752fbdc0d778fa92e97510f868ebbee5137329.zip
std/fmt/index.zig: test for printing double width hex bytes with zeros;
Co-Authored-By: Shawn Landden <shawn@git.icu>
Diffstat (limited to 'std')
-rw-r--r--std/fmt/index.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/fmt/index.zig b/std/fmt/index.zig
index 345c46441d..f9b68d7941 100644
--- a/std/fmt/index.zig
+++ b/std/fmt/index.zig
@@ -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);
}
}