From 03d8cf11143fd2d49d4b260b138a184320096284 Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Sun, 23 Jan 2011 17:34:05 -0500 Subject: [PATCH 1/4] Bug #656 - Unit test bug.656.t added (thanks Bryce Harrington) --- test/bug.656.t | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 test/bug.656.t diff --git a/test/bug.656.t b/test/bug.656.t new file mode 100755 index 000000000..76307e6b6 --- /dev/null +++ b/test/bug.656.t @@ -0,0 +1,72 @@ +#! /usr/bin/perl +################################################################################ +## taskwarrior - a command line task list manager. +## +## Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. +## All rights reserved. +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 2 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, write to the +## +## Free Software Foundation, Inc., +## 51 Franklin Street, Fifth Floor, +## Boston, MA +## 02110-1301 +## USA +## +################################################################################ + +use strict; +use warnings; +use Test::More tests => 6; + +# Create the rc file. +if (open my $fh, '>', 'bug.rc') +{ + print $fh "data.location=.\n", + "confirmation=no\n"; + close $fh; + ok (-r 'bug.rc', 'Created bug.rc'); +} + +# Bug 656: Recurring task continually spawns new tasks + +# Setup: Add a pair of recurring tasks +qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily}; +qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily}; + +# Bug describes that each time task is executed, another child task of the +# Second recurring task is created. + +qx{../src/task rc:bug.rc ls}; + + +# Result: Check for an extra task the second time task ls is executed +my $output = qx{../src/task rc:bug.rc ls}; +unlike ($output, qr/^\s3\s*Second recurring task\s*$/ms, 'Extra task detected.'); + +# Cleanup. +unlink 'pending.data'; +ok (!-r 'pending.data', 'Removed pending.data'); + +unlink 'completed.data'; +ok (!-r 'completed.data', 'Removed completed.data'); + +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + +unlink 'bug.rc'; +ok (!-r 'bug.rc', 'Removed bug.rc'); + +exit 0; + From 4d95dcf1da35eff431dfaa6993e96144c2bdd076 Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Sun, 23 Jan 2011 17:47:52 -0500 Subject: [PATCH 2/4] Bug c001 - Added unit test bug.c001.t to test for an unreported issue in 1.9.4 commit 2d50d1c that involves the creation of a recurring task not incrementing the displayed Task ID. --- test/bug.c001.t | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 test/bug.c001.t diff --git a/test/bug.c001.t b/test/bug.c001.t new file mode 100755 index 000000000..274efd288 --- /dev/null +++ b/test/bug.c001.t @@ -0,0 +1,68 @@ +#! /usr/bin/perl +################################################################################ +## taskwarrior - a command line task list manager. +## +## Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. +## All rights reserved. +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 2 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, write to the +## +## Free Software Foundation, Inc., +## 51 Franklin Street, Fifth Floor, +## Boston, MA +## 02110-1301 +## USA +## +################################################################################ + +use strict; +use warnings; +use Test::More tests => 6; + +# Create the rc file. +if (open my $fh, '>', 'bug.rc') +{ + print $fh "data.location=.\n", + "confirmation=no\n"; + close $fh; + ok (-r 'bug.rc', 'Created bug.rc'); +} + +# Unreported Bug c01: Entering two recurring tasks back to back fails to increment +# the ID returned to the user +# +# First noticed in 1.9.4 commit 2d50d1c + +# Setup: Add a recurring task +qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily}; + +# Result: Ensure the second recurring task has an ID of 2 +my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily}; +like ($output, qr/Created task 2\./ms, 'Recurring task assigned correct ID.'); + +# Cleanup. +unlink 'pending.data'; +ok (!-r 'pending.data', 'Removed pending.data'); + +unlink 'completed.data'; +ok (!-r 'completed.data', 'Removed completed.data'); + +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + +unlink 'bug.rc'; +ok (!-r 'bug.rc', 'Removed bug.rc'); + +exit 0; + From 3ba877b07805faeaca5a954c1e461a0cec382e67 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 24 Jan 2011 23:47:18 +0100 Subject: [PATCH 3/4] Added a few example of using H:N:S in dateformats to taskrc.5 --- doc/man/taskrc.5.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 215eb9cde..7fd47f05a 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -445,6 +445,12 @@ a D b Y (V) would do an output as "Fri 24 Jul 2009 (30)" A, B D, Y would do an output as "Friday, July 24, 2009" .br vV a Y-M-D would do an output as "v30 Fri 2009-07-24" +.br +yMD.HN would do an output as "110124.2342" +.br +m/d/Y H:N would do an output as "1/24/2011 10:42" +.br +a D b Y H:N:S would do and output as "Mon 24 Jan 2011 11:19:42" .RE .RE From 6e872c69dd877285c5f4ce7da29929a5452d7e0a Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Tue, 25 Jan 2011 23:55:03 +0100 Subject: [PATCH 4/4] feature #46 - proper sortable age column --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index d70039eb3..2aa971715 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,7 @@ + Added feature #629, a new holiday configuration file for New Zealand (thanks to Stephen Haywood). + Added feature #638, a wait:later possibility (thanks to Clément Bœsch). + + Added feature #46, proper sortable age column. + Added new holiday configuration file for Italy (thanks to Nicola Busanello). + Added new holiday configuration file for Austria (thanks to Andreas Poisel). + Eliminated dependency on ncurses.