/***
This file is part of systemd.
Copyright 2012 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
***/
int r;
}
int r;
else
else
else
}
test_one(
"Sat,Thu,Mon-Wed,Sat-Sun",
"Mon-Thu,Sat,Sun *-*-* 00:00:00");
test_one(
"Mon,Sun 12-*-* 2,1:23",
"Mon,Sun 2012-*-* 01,02:23:00");
test_one(
"Wed *-1",
"Wed *-*-01 00:00:00");
test_one(
"Wed-Wed,Wed *-1",
"Wed *-*-01 00:00:00");
test_one(
"Wed, 17:48",
"Wed *-*-* 17:48:00");
test_one(
"Wed-Sat,Tue 12-10-15 1:2:3",
"Tue-Sat 2012-10-15 01:02:03");
test_one(
"*-*-7 0:0:0",
"*-*-07 00:00:00");
test_one(
"monday *-12-* 17:00",
"Mon *-12-* 17:00:00");
test_one(
"Mon,Fri *-*-3,1,2 *:30:45",
"Mon,Fri *-*-01,02,03 *:30:45");
test_one(
"12,14,13,12:20,10,30",
"*-*-* 12,13,14:10,20,30:00");
test_one(
"mon,fri *-1/2-1,3 *:30:45",
"Mon,Fri *-01/2-01,03 *:30:45");
test_one(
"03-05 08:05:40",
"*-03-05 08:05:40");
test_one(
"Sat,Sun 12-05 08:05:40",
"Sat,Sun *-12-05 08:05:40");
test_one(
"Sat,Sun 08:05:40",
"Sat,Sun *-*-* 08:05:40");
test_one(
"2003-03-05 05:40",
"2003-03-05 05:40:00");
test_one(
"2003-03-05",
"2003-03-05 00:00:00");
test_one(
"weekly",
"Mon *-*-* 00:00:00");
test_one(
"quarterly",
"*-01,04,07,10-01 00:00:00");
test_one(
"semi-annually",
"*-01,07-01 00:00:00");
test_one(
"annually",
"*-01-01 00:00:00");
test_one(
"2015-10-25 01:00:00 uTc",
"2015-10-25 01:00:00 UTC");
test_one(
"2016-03-27 03:17:00.4200005",
"2016-03-27 03:17:00.420001");
test_one(
"2016-03-27 03:17:00/0.42",
"2016-03-27 03:17:00/0.420000");
test_one(
"2016-03-27 03:17:00/0.42",
"2016-03-27 03:17:00/0.420000");
test_next(
"2016-03-27 03:17:00",
"",
12345,
1459048620000000);
test_next(
"2016-03-27 03:17:00",
"CET",
12345,
1459041420000000);
test_next(
"2016-03-27 03:17:00",
"EET",
12345, -
1);
test_next(
"2016-03-27 03:17:00 UTC",
NULL,
12345,
1459048620000000);
test_next(
"2016-03-27 03:17:00 UTC",
"",
12345,
1459048620000000);
test_next(
"2016-03-27 03:17:00 UTC",
"CET",
12345,
1459048620000000);
test_next(
"2016-03-27 03:17:00 UTC",
"EET",
12345,
1459048620000000);
test_next(
"2016-03-27 03:17:00.420000001 UTC",
"EET",
12345,
1459048620420000);
test_next(
"2016-03-27 03:17:00.4200005 UTC",
"EET",
12345,
1459048620420001);
test_next(
"2015-11-13 09:11:23.42",
"EET",
12345,
1447398683420000);
test_next(
"2015-11-13 09:11:23.42/1.77",
"EET",
1447398683420000,
1447398685190000);
test_next(
"2015-11-13 09:11:23.42/1.77",
"EET",
1447398683419999,
1447398683420000);
return 0;
}