|
|
@@ -32,3 +32,21 @@ TEST(FormatTest, NCharReturnsNewLine) {
|
|
|
auto fmt = format::parse_format_string("%n");
|
|
|
EXPECT_THAT(fmt.process({}), Eq("\n"));
|
|
|
}
|
|
|
+
|
|
|
+TEST(FormatTest, DoublePctIsLiteral) {
|
|
|
+ using testing::Eq;
|
|
|
+ auto fmt = format::parse_format_string("%%");
|
|
|
+ EXPECT_THAT(fmt.process({}), Eq("%"));
|
|
|
+}
|
|
|
+
|
|
|
+TEST(FormatTest, CatchesRawContentBeforeFmt) {
|
|
|
+ using testing::Eq;
|
|
|
+ auto fmt = format::parse_format_string("TEST%%");
|
|
|
+ EXPECT_THAT(fmt.process({}), Eq("TEST%"));
|
|
|
+}
|
|
|
+
|
|
|
+TEST(FormatTest, CatchesRawContentAfterFmt) {
|
|
|
+ using testing::Eq;
|
|
|
+ auto fmt = format::parse_format_string("%%TEST");
|
|
|
+ EXPECT_THAT(fmt.process({}), Eq("%TEST"));
|
|
|
+}
|