summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/strings/str_format_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/strings/str_format_test.cc b/absl/strings/str_format_test.cc
index 5198fb33..20fd0289 100644
--- a/absl/strings/str_format_test.cc
+++ b/absl/strings/str_format_test.cc
@@ -638,6 +638,8 @@ TEST(StrFormat, BehavesAsDocumented) {
EXPECT_EQ(StrFormat("%#o", 10), "012");
EXPECT_EQ(StrFormat("%#x", 15), "0xf");
EXPECT_EQ(StrFormat("%04d", 8), "0008");
+ EXPECT_EQ(StrFormat("%#04x", 0), "0000");
+ EXPECT_EQ(StrFormat("%#04x", 1), "0x01");
// Posix positional substitution.
EXPECT_EQ(absl::StrFormat("%2$s, %3$s, %1$s!", "vici", "veni", "vidi"),
"veni, vidi, vici!");