summaryrefslogtreecommitdiff
path: root/src/test/test-date.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-25 22:58:00 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-25 22:58:00 +0100
commit46f190483facaccf6f8f2bfba453f7c7dd231b22 (patch)
tree127e8577554cbd3a173b7dd47b29b98b9ae99965 /src/test/test-date.c
parentf739078599ee9b1e00f643b5b4c45a0d57938fe1 (diff)
parentb4ae407d3ed6701df4e079d65b8fc3607437c569 (diff)
Merge pull request #1673 from mustrumr/date-fixes
Date fixes
Diffstat (limited to 'src/test/test-date.c')
-rw-r--r--src/test/test-date.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/test-date.c b/src/test/test-date.c
index 8d78ab89d0..e1c6ecb2ef 100644
--- a/src/test/test-date.c
+++ b/src/test/test-date.c
@@ -43,6 +43,12 @@ static void test_should_pass(const char *p) {
assert_se(parse_timestamp(buf, &q) >= 0);
}
+static void test_should_parse(const char *p) {
+ usec_t t;
+
+ assert_se(parse_timestamp(p, &t) >= 0);
+}
+
static void test_should_fail(const char *p) {
usec_t t;
@@ -86,7 +92,8 @@ int main(int argc, char *argv[]) {
test_one_noutc("+2y 4d");
test_one_noutc("5months ago");
test_one_noutc("@1395716396");
- test_one_noutc("today UTC");
+ test_should_parse("today UTC");
+ test_should_fail("today UTC UTC");
return 0;
}