summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDouglas Christman <DouglasChristman@gmail.com>2016-11-24 12:21:37 -0500
committerDouglas Christman <DouglasChristman@gmail.com>2016-11-24 18:22:08 -0500
commit04773cb50aca6484921c40bef3cbc0171c1e4786 (patch)
treee3e92859ac24ebd7ddabbbc115549fcc4d1093bf /src/test
parent408a51e15614ca0c6cd80558adb20efe448d16d8 (diff)
downloadsystemd-04773cb50aca6484921c40bef3cbc0171c1e4786.tar.gz
calendarspec: reject strings that only contain a timezone
This makes " UTC" an illegal date specification.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-calendarspec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
index 7357c522e0..c539d16867 100644
--- a/src/test/test-calendarspec.c
+++ b/src/test/test-calendarspec.c
@@ -202,6 +202,7 @@ int main(int argc, char* argv[]) {
test_next("Mon 2017-05~07/1 UTC", "", 12345, 1496016000000000);
assert_se(calendar_spec_from_string("test", &c) < 0);
+ assert_se(calendar_spec_from_string(" utc", &c) < 0);
assert_se(calendar_spec_from_string(" ", &c) < 0);
assert_se(calendar_spec_from_string("", &c) < 0);
assert_se(calendar_spec_from_string("7", &c) < 0);