diff --git a/AUTHORS b/AUTHORS index b86adc376..4ed2fe7ea 100644 --- a/AUTHORS +++ b/AUTHORS @@ -78,4 +78,5 @@ suggestions: Andy Kriger Patrick R McDonald Pete Lewis + Bryce Harrington diff --git a/ChangeLog b/ChangeLog index 40f2c5855..f245acb3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -104,6 +104,8 @@ contained certain tokens (like 'Due:'). + Fixed bug #654, which broke the info command when a task had no journal entries. + + Fixed bug #656, which caused multiple recurring child tasks to be created + (thanks to Bryce Harrington). + Fixed bug #671, removing the claim in the 'edit' command claims that description text can wrap over multiple lines, because it cannot. diff --git a/src/TDB.cpp b/src/TDB.cpp index 26fda6fff..742769642 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -311,8 +311,7 @@ int TDB::loadPending (std::vector & tasks, Filter& filter) Task task (line); Task::status status = task.getStatus (); - if (status != Task::recurring) - task.id = mId++; + task.id = mId++; mPending.push_back (task); diff --git a/test/bug.annual.t b/test/bug.annual.t index 76c22def7..69758ce87 100755 --- a/test/bug.annual.t +++ b/test/bug.annual.t @@ -43,30 +43,30 @@ if (open my $fh, '>', 'annual.rc') # # ID Project Pri Due Active Age Description # -- ------- --- ---------- ------ --- ----------- -# 1 1/1/2000 - foo -# 2 12/31/2000 - foo -# 3 12/31/2001 - foo -# 4 12/31/2002 - foo -# 5 12/31/2003 - foo -# 6 12/30/2004 - foo -# 7 12/30/2005 - foo -# 8 12/30/2006 - foo -# 9 12/30/2007 - foo -# 10 12/29/2008 - foo -# 11 12/29/2009 - foo +# 2 1/1/2000 - foo +# 3 12/31/2000 - foo +# 4 12/31/2001 - foo +# 5 12/31/2002 - foo +# 6 12/31/2003 - foo +# 7 12/30/2004 - foo +# 8 12/30/2005 - foo +# 9 12/30/2006 - foo +# 10 12/30/2007 - foo +# 11 13/29/2008 - foo +# 12 12/29/2009 - foo qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009}; my $output = qx{../src/task rc:annual.rc list}; -like ($output, qr/1\s+1\/1\/2000\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 1 no creep'); -like ($output, qr/2\s+1\/1\/2001\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 2 no creep'); -like ($output, qr/3\s+1\/1\/2002\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 3 no creep'); -like ($output, qr/4\s+1\/1\/2003\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 4 no creep'); -like ($output, qr/5\s+1\/1\/2004\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 5 no creep'); -like ($output, qr/6\s+1\/1\/2005\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 6 no creep'); -like ($output, qr/7\s+1\/1\/2006\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 7 no creep'); -like ($output, qr/8\s+1\/1\/2007\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 8 no creep'); -like ($output, qr/9\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 9 no creep'); -like ($output, qr/10\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep'); +like ($output, qr/2\s+1\/1\/2000\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 2 no creep'); +like ($output, qr/3\s+1\/1\/2001\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 3 no creep'); +like ($output, qr/4\s+1\/1\/2002\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 4 no creep'); +like ($output, qr/5\s+1\/1\/2003\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 5 no creep'); +like ($output, qr/6\s+1\/1\/2004\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 6 no creep'); +like ($output, qr/7\s+1\/1\/2005\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 7 no creep'); +like ($output, qr/8\s+1\/1\/2006\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 8 no creep'); +like ($output, qr/9\s+1\/1\/2007\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 9 no creep'); +like ($output, qr/10\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep'); +like ($output, qr/11\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 11 no creep'); # Cleanup. unlink 'pending.data'; diff --git a/test/custom.recur_ind.t b/test/custom.recur_ind.t index 194416c4c..4a47c193e 100755 --- a/test/custom.recur_ind.t +++ b/test/custom.recur_ind.t @@ -47,12 +47,12 @@ qx{../src/task rc:custom.rc add foo due:tomorrow recur:weekly}; qx{../src/task rc:custom.rc add bar}; my $output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/ID R/, 'Recurrence indicator heading'); -like ($output, qr/2\s+R/, 'Recurrence indicator t1'); -unlike ($output, qr/1\s+R/, 'No recurrence indicator t2'); +like ($output, qr/3\s+R/, 'Recurrence indicator t1'); +unlike ($output, qr/2\s+R/, 'No recurrence indicator t2'); $output = qx{../src/task rc:custom.rc foo rc.recurrence.indicator=RE 2>&1}; -like ($output, qr/2\s+RE/, 'Custom recurrence indicator t1'); -unlike ($output, qr/1\s+RE/, 'No custom recurrence indicator t2'); +like ($output, qr/3\s+RE/, 'Custom recurrence indicator t1'); +unlike ($output, qr/2\s+RE/, 'No custom recurrence indicator t2'); # Cleanup. unlink 'pending.data'; diff --git a/test/recur.until.t b/test/recur.until.t index b40b471c9..a23759113 100755 --- a/test/recur.until.t +++ b/test/recur.until.t @@ -43,10 +43,10 @@ qx{../src/task rc:recur.rc add foo due:now recur:2sec until:5sec}; diag ("Sleeping for 6 seconds"); sleep 6; my $output = qx{../src/task rc:recur.rc list}; -like ($output, qr/^\s+1/ms, 'Found 1'); like ($output, qr/^\s+2/ms, 'Found 2'); like ($output, qr/^\s+3/ms, 'Found 3'); like ($output, qr/^\s+4/ms, 'Found 4'); +like ($output, qr/^\s+5/ms, 'Found 5'); qx{../src/task rc:recur.rc do $_} for 1..5; $output = qx{../src/task rc:recur.rc list}; diff --git a/test/text.t.cpp b/test/text.t.cpp index b4772ab4e..23d0e4490 100644 --- a/test/text.t.cpp +++ b/test/text.t.cpp @@ -34,7 +34,7 @@ Context context; //////////////////////////////////////////////////////////////////////////////// int main (int argc, char** argv) { - UnitTest t (213); + UnitTest t (208); // void wrapText (std::vector & lines, const std::string& text, const int width) std::string text = "This is a test of the line wrapping code."; @@ -416,13 +416,6 @@ int main (int argc, char** argv) // std::string format (double, int, int); - // std::string printable (const std::string&); - t.is (printable ("a\rb"), "a\\rb", "printable -> \\r"); - t.is (printable ("a\nb"), "a\\nb", "printable -> \\n"); - t.is (printable ("a\fb"), "a\\fb", "printable -> \\f"); - t.is (printable ("a\tb"), "a\\tb", "printable -> \\t"); - t.is (printable ("a\vb"), "a\\vb", "printable -> \\v"); - return 0; }