parser/tests: allow for DST change

e.g. 21d / 2w are subject to DST; update the tolerance.
This commit is contained in:
djcb
2018-03-31 18:44:17 +03:00
parent 0356af5c98
commit b4cc67d455

View File

@ -86,8 +86,8 @@ test_date_ymwdhMs (void)
int tolerance;
} tests[] = {
{ "3h", 3 * 60 * 60, 1 },
{ "21d", 21 * 24 * 60 * 60, 1 },
{ "2w", 2 * 7 * 24 * 60 * 60, 1 },
{ "21d", 21 * 24 * 60 * 60, 3600 + 1 },
{ "2w", 2 * 7 * 24 * 60 * 60, 3600 + 1 },
{ "2y", 2 * 365 * 24 * 60 * 60, 24 * 3600 + 1 },
{ "3m", 3 * 30 * 24 * 60 * 60, 3 * 24 * 3600 + 1 }
@ -154,8 +154,6 @@ test_format ()
"hello world, 123");
}
int
main (int argc, char *argv[])
{