mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #1273
- #1273 Query with negative relative date differs greatly from absolute date in past (thanks to John West).
This commit is contained in:
parent
9099a353ea
commit
c1492d8010
6 changed files with 16 additions and 3 deletions
|
@ -51,7 +51,7 @@ int convertDuration (const std::string& input)
|
|||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (644);
|
||||
UnitTest t (646);
|
||||
|
||||
// Ensure environment has no influence.
|
||||
unsetenv ("TASKDATA");
|
||||
|
@ -728,6 +728,11 @@ int main (int argc, char** argv)
|
|||
t.is (convertDuration ("10d"), 10, "valid duration 10d");
|
||||
|
||||
t.is (convertDuration ("-"), 0, "valid duration -");
|
||||
|
||||
d = Duration ("-4d");
|
||||
t.is ((time_t)d, 4*86400, "-4d == 4*86400");
|
||||
t.ok (d.negative (), "-4d == negative");
|
||||
|
||||
try
|
||||
{
|
||||
Duration left, right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue