zstring: Add fmt formatter
Change-Id: I5947dc2efa452149f412250134d4a041cee04bc2
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/zstring.cpp b/test/zstring.cpp
index 70f4c88..600b493 100644
--- a/test/zstring.cpp
+++ b/test/zstring.cpp
@@ -1,3 +1,4 @@
+#include <fmt/format.h>
#include <gtest/gtest.h>
#include <iostream>
#include <stdplus/zstring.hpp>
@@ -37,6 +38,8 @@
EXPECT_EQ(str2, zs);
std::cerr << const_zstring(as);
+ EXPECT_EQ("dd", fmt::format("d{}", zs));
+ EXPECT_EQ("dc", fmt::format("d{}", const_zstring(as)));
auto from_str = [&](const_zstring cs) { EXPECT_EQ(cs, "ac"); };
from_str("ac"s);