mirror of https://github.com/djcb/mu.git
parser/tests: allow for DST change
e.g. 21d / 2w are subject to DST; update the tolerance.
This commit is contained in:
parent
0356af5c98
commit
b4cc67d455
|
@ -81,13 +81,13 @@ static void
|
|||
test_date_ymwdhMs (void)
|
||||
{
|
||||
struct {
|
||||
std::string expr;
|
||||
long diff;
|
||||
int tolerance;
|
||||
std::string expr;
|
||||
long diff;
|
||||
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[])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue