summaryrefslogtreecommitdiff
path: root/test/test_format.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2025-01-02 15:11:51 -0600
committerDominick Allen <djallen@librehumanitas.org>2025-01-02 15:11:51 -0600
commit87071200872c2450c947047350132aee493033c1 (patch)
tree49109532d9bbd148b4e59043120037684093be33 /test/test_format.cpp
parent16379362c02a2472f00fac49cad62788547c9519 (diff)
Get basic CSV parser operating.
Diffstat (limited to 'test/test_format.cpp')
-rw-r--r--test/test_format.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_format.cpp b/test/test_format.cpp
index b9d373c..738b551 100644
--- a/test/test_format.cpp
+++ b/test/test_format.cpp
@@ -709,4 +709,13 @@ TEST(FormatTest, TwoArgFormatTest)
EXPECT_STREQ(sink.c_str(), expected.c_str());
}
+TEST(FormatTest, StringView)
+{
+ String sink{};
+ auto expected = std::format("Test {}", std::string_view{"Hello, World!"});
+ auto formatResult = format(sink, FormatCharMode::Unchecked, u8"Test {}", StringView{u8"Hello, World!"});
+ EXPECT_TRUE(formatResult.isOkay());
+ EXPECT_STREQ(sink.c_str(), expected.c_str());
+}
+
} // namespace fud