|
|
@@ -65,3 +65,15 @@ TEST(FormatTest, FormatsMicroseconds) {
|
|
|
auto fmt = format::parse_format_string("%d");
|
|
|
EXPECT_THAT(fmt.process({{NOW,123000}}), Eq("2019-04-04 18:17:20,123"));
|
|
|
}
|
|
|
+
|
|
|
+TEST(FormatTest, SupportsCustomFormatWithBrace) {
|
|
|
+ using testing::Eq;
|
|
|
+ auto fmt = format::parse_format_string("%d{%Y}");
|
|
|
+ EXPECT_THAT(fmt.process({{NOW,0}}), Eq("2019"));
|
|
|
+}
|
|
|
+
|
|
|
+TEST(FormatTest, SupportsISO8601Format) {
|
|
|
+ using testing::Eq;
|
|
|
+ auto fmt = format::parse_format_string("%d{ISO8601}");
|
|
|
+ EXPECT_THAT(fmt.process({{NOW,0}}), Eq("2019-04-04T18:17:20.000Z"));
|
|
|
+}
|