diff --git a/test/bug.605.t b/test/bug.605.t index df5fb34ac..fa6fcfa5c 100755 --- a/test/bug.605.t +++ b/test/bug.605.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n", "confirmation=off\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug #605 - project count zero bug? @@ -58,11 +57,5 @@ like ($output, qr/is 100\% complete/ms, 'Empty project correctly reported as bei # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.628.t b/test/bug.628.t index e93abdbb8..85d39bf8b 100755 --- a/test/bug.628.t +++ b/test/bug.628.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 1; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -40,13 +40,12 @@ if (open my $fh, '>', 'bug.rc') "confirmation=no\n", "dateformat=a b D Y\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 628: task wait: with non-standard dateformat bug # Setup: Add a task -qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task 2>&1}; +qx{../src/task rc:bug.rc add wait:"Wed Jan 01 2030" A buggy task 2>&1}; # Result: Immediately delete the created task my $output = qx{../src/task rc:bug.rc waiting 2>&1}; @@ -54,11 +53,5 @@ like ($output, qr/Jan 01 2020/ms, 'a b D Y dateformat correctly parsed.'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.634.t b/test/bug.634.t index f09f33472..c29e5a061 100755 --- a/test/bug.634.t +++ b/test/bug.634.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n", "confirmation=no\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 634: confirmation=off not honored by undo @@ -54,11 +53,5 @@ unlike ($output, qr/Are you sure/ms, 'Undo honours confirmation=off.'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.635.t b/test/bug.635.t index 8abf802c1..9e9714057 100755 --- a/test/bug.635.t +++ b/test/bug.635.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 1; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n", "confirmation=no\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 635: /OLD/NEW/g is broken? @@ -56,11 +55,5 @@ like ($output, qr/Pay the rent on the 31st/ms, 'Global replace performed correct # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.649.t b/test/bug.649.t index 85f064fd9..f75b1b17f 100755 --- a/test/bug.649.t +++ b/test/bug.649.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n", "confirmation=no\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 649: 1.9.4 commit ae4e286 - Recurring tasks can't be immediately @@ -55,11 +54,5 @@ unlike ($output, qr/Completed 1/ms, 'New recurring task cannot be immediately co # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.656.t b/test/bug.656.t index e5f456c9a..a6502ec41 100755 --- a/test/bug.656.t +++ b/test/bug.656.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ 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 @@ -59,11 +58,5 @@ unlike ($output, qr/^\s3\s*Second recurring task\s*$/ms, 'Extra task detected.') # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.674.t b/test/bug.674.t index 1f72b22cc..f1871f455 100755 --- a/test/bug.674.t +++ b/test/bug.674.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 1; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -38,7 +38,6 @@ if (open my $fh, '>', 'bug.rc') { print $fh "data.location=.\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 674: ID numbers change between reports when marking tasks as done @@ -57,11 +56,5 @@ like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.694.t b/test/bug.694.t index 46411126c..b001de91b 100755 --- a/test/bug.694.t +++ b/test/bug.694.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 3; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -38,7 +38,6 @@ if (open my $fh, '>', 'bug.rc') { print $fh "data.location=.\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 694: Potential bug for "due" and "annotate" @@ -55,11 +54,5 @@ like ($output, qr/Due/, 'found Due'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.703.t b/test/bug.703.t index b8ce107f5..4caaada3c 100755 --- a/test/bug.703.t +++ b/test/bug.703.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 8; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n"; print $fh "confirmation=no\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 703: /from/t/g fails to make all changes to annotations @@ -65,11 +64,5 @@ like ($output, qr/AnnotatIon three/, 'new annotation three'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0; diff --git a/test/bug.708.t b/test/bug.708.t index 0e8a87d07..79101bd11 100755 --- a/test/bug.708.t +++ b/test/bug.708.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 4; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -40,25 +40,24 @@ if (open my $fh, '>', 'bug.rc') print $fh "bulk=100\n"; print $fh "confirmation=no\n"; close $fh; - ok (-r 'bug.rc', 'Created bug.rc'); } # Bug 708: Bad Math in Project is % Complete # Setup: Add a few tasks -qx{../src/task rc:bug.rc add One pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Two pro:p1 2>&1}; +qx{../src/task rc:bug.rc add One pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Two pro:p1 2>&1}; qx{../src/task rc:bug.rc add Three pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Four pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Five pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Six pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Four pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Five pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Six pro:p1 2>&1}; qx{../src/task rc:bug.rc add Seven pro:p1 2>&1}; qx{../src/task rc:bug.rc add Eight pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Nine pro:p1 2>&1}; -qx{../src/task rc:bug.rc add Ten pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Nine pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Ten pro:p1 2>&1}; # Complete three tasks and ensure pending and done counts are updated correctly. -my $output = qx{../src/task rc:bug.rc 1-3 do 2>&1 >/dev/null}; +my $output = qx{../src/task rc:bug.rc 1-3 done 2>&1 >/dev/null}; like ($output, qr/Project 'p1' is 30% complete \(7 of 10 tasks remaining\)\./ms, 'Project counts correct for a multiple done'); # Change three projects and ensure pending and done counts are updated correctly. @@ -67,16 +66,10 @@ like ($output, qr/Project 'p1' is 42% complete \(4 of 7 tasks remaining\)\./ms like ($output, qr/Project 'p2' is 0% complete \(3 of 3 tasks remaining\)\./ms, 'Project counts correct for a multiple project reassignment part b'); # Delete three tasks and ensure pending and done counts are updated correctly. -$output = qx{../src/task rc:bug.rc 7-9 del 2>&1 >/dev/null}; +$output = qx{../src/task rc:bug.rc 7-9 delete 2>&1 >/dev/null}; like ($output, qr/Project 'p1' is 75% complete \(1 of 4 tasks remaining\)\./ms, 'Project counts correct for a multiple delete'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data bug.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'bug.rc', 'Cleanup'); - exit 0;