mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #624
- Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
This commit is contained in:
parent
b5c46062c6
commit
0c05069baf
2 changed files with 6 additions and 2 deletions
|
@ -73,6 +73,7 @@
|
|||
+ Applied patch to fix bug #618, so that the configuration setting
|
||||
'edit.verbose' can be set to 'no' and eliminate the help text when using
|
||||
the 'task edit' command (thanks to Steve Rader).
|
||||
+ Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ int convertDuration (const std::string& input)
|
|||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (606);
|
||||
UnitTest t (608);
|
||||
|
||||
Duration d;
|
||||
|
||||
|
@ -627,7 +627,9 @@ int main (int argc, char** argv)
|
|||
t.ok (d.valid ("-1 sec"), "valid duration -1 sec");
|
||||
t.ok (d.valid ("-1s"), "valid duration -1s");
|
||||
|
||||
t.notok (d.valid ("woof"), "valid duration woof = fail");
|
||||
t.ok (d.valid ("-"), "valid duration -");
|
||||
|
||||
t.notok (d.valid ("woof"), "valid duration woof = fail");
|
||||
|
||||
t.is (convertDuration ("daily"), 1, "valid duration daily");
|
||||
t.is (convertDuration ("day"), 1, "valid duration day");
|
||||
|
@ -695,6 +697,7 @@ int main (int argc, char** argv)
|
|||
t.is (convertDuration ("10 day"), 10, "valid duration 10 day");
|
||||
t.is (convertDuration ("10d"), 10, "valid duration 10d");
|
||||
|
||||
t.is (convertDuration ("-"), 0, "valid duration -");
|
||||
try
|
||||
{
|
||||
Duration left, right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue