summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-12-16 23:43:51 +0100
committerMax Kellermann <max@musicpd.org>2019-12-16 23:44:20 +0100
commit683d5848f414d1539686df2e0dc886d5252d34fe (patch)
treef082db3606a8afcd4413c88fc32e5394356c51ee /test
parentb4496272650f654113be00efddfda1deea8bb5a7 (diff)
parent5680a3a4b71661179b81e6434928d919d186c785 (diff)
Merge tag 'v0.21.17'
release v0.21.17
Diffstat (limited to 'test')
-rw-r--r--test/TestISO8601.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/TestISO8601.cxx b/test/TestISO8601.cxx
index 3305b47de..cd0897c1a 100644
--- a/test/TestISO8601.cxx
+++ b/test/TestISO8601.cxx
@@ -71,6 +71,15 @@ static constexpr struct {
{ "2019-02-04T16:46:41+0200", 1549291601, std::chrono::seconds(1) },
{ "2019-02-04T16:46:41+02:00", 1549291601, std::chrono::seconds(1) },
{ "2019-02-04T16:46:41-0200", 1549306001, std::chrono::seconds(1) },
+
+ /* without field separators */
+ { "19700101T000000Z", 0, std::chrono::seconds(1) },
+ { "19700101T000001Z", 1, std::chrono::seconds(1) },
+ { "20190204T164641Z", 1549298801, std::chrono::seconds(1) },
+ { "19700101", 0, std::chrono::hours(24) },
+ { "20190204", 1549238400, std::chrono::hours(24) },
+ { "20190204T1646", 1549298760, std::chrono::minutes(1) },
+ { "20190204T16", 1549296000, std::chrono::hours(1) },
};
TEST(ISO8601, Parse)