From 44e7fdac4bd07c053026a83eec316cafe94fb37e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 15 Oct 2011 22:25:38 -0400 Subject: [PATCH] Unit Tests - Improved signal to noise ratio of all remaining unit tests. --- test/abbreviation.t | 26 ++++-------- test/add.t | 26 ++++-------- test/alias.t | 26 ++++-------- test/backslash.t | 26 ++++-------- test/basic.t | 2 +- test/bug.299.t | 26 ++++-------- test/bug.327.t | 26 ++++-------- test/bug.368.t | 26 ++++-------- test/bug.414.t | 26 ++++-------- test/bug.417.t | 26 ++++-------- test/bug.418.t | 26 ++++-------- test/bug.425.t | 26 ++++-------- test/bug.434.t | 26 ++++-------- test/bug.438.t | 26 ++++-------- test/bug.440.t | 26 ++++-------- test/bug.441.t | 26 ++++-------- test/bug.455.t | 26 ++++-------- test/bug.489.t | 26 ++++-------- test/bug.495.t | 26 ++++-------- test/bug.555.t | 26 ++++-------- test/bug.628.t | 26 +++++------- test/bug.634.t | 26 ++++-------- test/bug.635.t | 26 ++++-------- test/bug.649.t | 26 ++++-------- test/bug.656.t | 26 ++++-------- test/bug.668.t | 26 ++++-------- test/bug.674.t | 28 +++++-------- test/bug.694.t | 26 ++++-------- test/bug.703.t | 26 ++++-------- test/bug.before.t | 26 ++++-------- test/bug.bulk.t | 26 ++++-------- test/bug.c001.t | 26 ++++-------- test/bug.cal.t | 26 ++++-------- test/bug.hang.t | 30 +++++--------- test/bug.range.t | 26 ++++-------- test/bug.recur.t | 26 ++++-------- test/bug.sort.t | 26 ++++-------- test/bug.start.extra.t | 26 ++++-------- test/bug.summary.t | 26 ++++-------- test/cal.t | 26 ++++-------- test/color.active.t | 26 ++++-------- test/color.deprecated.t | 23 ++++------- test/color.disable.t | 26 ++++-------- test/color.due.t | 26 ++++-------- test/color.duetoday.t | 26 ++++-------- test/color.keyword.t | 26 ++++-------- test/color.overdue.t | 26 ++++-------- test/color.pri.t | 26 ++++-------- test/color.project.t | 26 ++++-------- test/color.recurring.t | 26 ++++-------- test/color.tag.t | 26 ++++-------- test/color.tagged.t | 26 ++++-------- test/config.obsolete.t | 26 ++++-------- test/custom.columns.t | 26 ++++-------- test/custom.priority_long.t | 26 ++++-------- test/custom.recur_ind.t | 26 ++++-------- test/custom.t | 26 ++++-------- test/custom.tag_ind.t | 26 ++++-------- test/dateformat.t | 34 +++++----------- test/datesort.t | 26 ++++-------- test/denotate.t | 26 ++++-------- test/dependencies.t | 26 ++++-------- test/due.t | 26 ++++-------- test/duplicate.t | 26 ++++-------- test/enpassant.t | 26 ++++-------- test/feature.559.t | 26 ++++-------- test/feature.608.t | 26 ++++-------- test/feature.exit.t | 26 ++++-------- test/filter-prefix.t | 26 ++++-------- test/filter.t | 28 +++++-------- test/fontunderline.t | 26 ++++-------- test/history.annual.t | 26 ++++-------- test/history.monthly.t | 26 ++++-------- test/hook.on-exit.t | 30 +++++--------- test/hook.on-launch.t | 12 +++++- test/ids.t | 26 ++++-------- test/label.t | 26 ++++-------- test/limit.t | 26 ++++-------- test/log.t | 26 ++++-------- test/nag.t | 26 ++++-------- test/next.t | 26 ++++-------- test/oldest.t | 26 ++++-------- test/overdue.t | 26 ++++-------- test/override.t | 26 ++++-------- test/pri_sort.t | 26 ++++-------- test/project.t | 26 ++++-------- test/recur.limit.t | 26 ++++-------- test/recur.t | 79 +++++++++++++++++++++++-------------- test/recur.weekdays.t | 26 ++++-------- test/sequence.t | 26 ++++-------- test/shadow.t | 30 +++++--------- test/sorting.t | 26 ++++-------- test/special.t | 26 ++++-------- test/start.t | 35 +++++----------- test/subproject.t | 26 ++++-------- test/tag.t | 26 ++++-------- test/undo.t | 29 ++++---------- test/urgency.t | 26 ++++-------- test/utf8.t | 26 ++++-------- test/wait.t | 26 ++++-------- 100 files changed, 847 insertions(+), 1801 deletions(-) diff --git a/test/abbreviation.t b/test/abbreviation.t index c24ac5d25..064c1766f 100755 --- a/test/abbreviation.t +++ b/test/abbreviation.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More tests => 21; # Create the rc file. if (open my $fh, '>', 'abbrev.rc') @@ -90,23 +90,13 @@ $output = qx{../src/task rc:abbrev.rc v}; like ($output, qr/MIT\s+license/, 'version'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'abbrev.rc'; -ok (!-r 'abbrev.rc', 'Removed abbrev.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key abbrev.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'abbrev.rc', 'Cleanup'); exit 0; diff --git a/test/add.t b/test/add.t index 4c1147992..086b7f3ae 100755 --- a/test/add.t +++ b/test/add.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'add.rc') @@ -56,23 +56,13 @@ like ($output, qr/Status\s+Pending\n/, 'add Pending'); like ($output, qr/Description\s+This a TEST\n/, 'add Description'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'add.rc'; -ok (!-r 'add.rc', 'Removed add.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key add.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'add.rc', 'Cleanup'); exit 0; diff --git a/test/alias.t b/test/alias.t index 318ee64ef..114f9424c 100755 --- a/test/alias.t +++ b/test/alias.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'alias.rc') @@ -53,23 +53,13 @@ $output = qx{../src/task rc:alias.rc bar}; like ($output, qr/ALIAS/, 'task bar -> foo -> _projects -> ALIAS'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'alias.rc'; -ok (!-r 'alias.rc', 'Removed alias.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key alias.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'alias.rc', 'Cleanup'); exit 0; diff --git a/test/backslash.t b/test/backslash.t index ffe913745..54dd33766 100755 --- a/test/backslash.t +++ b/test/backslash.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'backslash.rc') @@ -44,23 +44,13 @@ my $output = qx{../src/task rc:backslash.rc ls}; like ($output, qr/\\/, 'Backslash preserved, no parsing issues'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'backslash.rc'; -ok (!-r 'backslash.rc', 'Removed backslash.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key backslash.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'backslash.rc', 'Cleanup'); exit 0; diff --git a/test/basic.t b/test/basic.t index 6b5dc3338..9d37caba4 100755 --- a/test/basic.t +++ b/test/basic.t @@ -75,7 +75,7 @@ sub slurp s/, support.*$//; close $fh; return $_; - } + } } } ''; diff --git a/test/bug.299.t b/test/bug.299.t index c6dfc475b..4fc290798 100755 --- a/test/bug.299.t +++ b/test/bug.299.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -52,23 +52,13 @@ unlike ($output, qr/two.*bar/ms, 'project.isnt:one project.isnt:two - no bar'); like ($output, qr/three.*baz/ms, 'project.isnt:one project.isnt:two - yes baz'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.327.t b/test/bug.327.t index 6c1bf6cf4..8cf307db5 100755 --- a/test/bug.327.t +++ b/test/bug.327.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -50,23 +50,13 @@ my $output = qx{../src/task rc:bug.rc li}; unlike ($output, qr/1969/ms, 'Should not display 12/31/1969'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.368.t b/test/bug.368.t index 92ab441f8..f06ecab3e 100755 --- a/test/bug.368.t +++ b/test/bug.368.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -49,23 +49,13 @@ unlike ($output, qr/Recur until\s+\d{10}/, 'until is not shown as an ep like ($output, qr/Recur until\s+\d+\/\d+\/\d{4}/, 'until is shown as a date'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.414.t b/test/bug.414.t index 68b10f845..60b6ce6b6 100755 --- a/test/bug.414.t +++ b/test/bug.414.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -57,23 +57,13 @@ $output = qx{../src/task rc:bug.rc ls -föo}; unlike ($output, qr/two/, 'not found UTF8 tag föo'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.417.t b/test/bug.417.t index 9072c1b0a..54e278a0b 100755 --- a/test/bug.417.t +++ b/test/bug.417.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -51,23 +51,13 @@ $output = qx{../src/task rc:bug.rc rc.report.long.sort:due- long}; like ($output, qr/after.+now.+before/ms, 'rc.report.long.sort:due- works'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.418.t b/test/bug.418.t index cdf59c20a..404005223 100755 --- a/test/bug.418.t +++ b/test/bug.418.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 25; +use Test::More tests => 20; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -80,23 +80,13 @@ unlike ($output, qr/eight/ms, 'task 8 not listed'); unlike ($output, qr/nine/ms, 'task 9 not listed'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.425.t b/test/bug.425.t index 3a221fbaa..617a7a0e4 100755 --- a/test/bug.425.t +++ b/test/bug.425.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', '425.rc') @@ -52,22 +52,12 @@ my $output = qx{../src/task rc:425.rc 1 ls}; like ($output, qr/1\s+Bar in Bar/m, 'parser - interpret \'in\' in description'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink '425.rc'; -ok (!-r '425.rc', 'Removed 425.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key 425.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r '425.rc', 'Cleanup'); exit 0; diff --git a/test/bug.434.t b/test/bug.434.t index 2e1a86c9f..112861585 100755 --- a/test/bug.434.t +++ b/test/bug.434.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -47,23 +47,13 @@ my $output = qx{../src/task rc:bug.rc 1 done}; like ($output, qr/Completed 1 task\./, 'Waiting task marked completed'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.438.t b/test/bug.438.t index 4ed3a618d..a0536af95 100755 --- a/test/bug.438.t +++ b/test/bug.438.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -82,23 +82,13 @@ $output = qx{../src/task rc:bug.rc rc.report.foo.sort:end- foo}; like ($output, qr/newer.+older/ms, 'sort:end- -> newer older'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.440.t b/test/bug.440.t index 7d8efd071..2207eea03 100755 --- a/test/bug.440.t +++ b/test/bug.440.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', '440.rc') @@ -60,22 +60,12 @@ unlike ($output2, qr/Foo/, 'simultaneous append and subst - subst'); like ($output2, qr/\w+ Appendtext/, 'simultaneous append and subst - append'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink '440.rc'; -ok (!-r '440.rc', 'Removed 440.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key 440.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r '440.rc', 'Cleanup'); exit 0; diff --git a/test/bug.441.t b/test/bug.441.t index 4f55112d3..b9440fddd 100755 --- a/test/bug.441.t +++ b/test/bug.441.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', '441.rc') @@ -47,22 +47,12 @@ my $output = qx{../src/task rc:441.rc ls}; like ($output, qr/one two: three/ms, 'Substitution with colon worked'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink '441.rc'; -ok (!-r '441.rc', 'Removed 441.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key 441.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r '441.rc', 'Cleanup'); exit 0; diff --git a/test/bug.455.t b/test/bug.455.t index 1be07c27e..eff23fa4a 100755 --- a/test/bug.455.t +++ b/test/bug.455.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', '455.rc') @@ -50,22 +50,12 @@ like ($output, qr/\s{7}abc/ms, 'bug 455 - correct spacing in utf8 task'); like ($output, qr/\s{7}def/ms, 'bug 455 - correct spacing in non utf8 task'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink '455.rc'; -ok (!-r '455.rc', 'Removed 455.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key 455.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r '455.rc', 'Cleanup'); exit 0; diff --git a/test/bug.489.t b/test/bug.489.t index 005e1bc50..9768a3353 100755 --- a/test/bug.489.t +++ b/test/bug.489.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -47,22 +47,12 @@ unlike ($output, qr/with /, 'tags.none: skips tagged'); like ($output, qr/without/, 'tags.none: finds tagless'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.495.t b/test/bug.495.t index 040627ad8..fc0d7d4ec 100755 --- a/test/bug.495.t +++ b/test/bug.495.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -47,22 +47,12 @@ my $output = qx{../src/task rc:bug.rc list}; like ($output, qr/This is -- a -- test/, 'Double hyphens preserved, except the first ones.'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.555.t b/test/bug.555.t index d3e02756b..837f7b0c9 100755 --- a/test/bug.555.t +++ b/test/bug.555.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -44,22 +44,12 @@ my $output = qx{../src/task rc:bug.rc log description project:p}; unlike ($output, qr/Segmentation fault/, 'no segfault from log with project'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.628.t b/test/bug.628.t index 0a2c077c2..d3fbad43a 100755 --- a/test/bug.628.t +++ b/test/bug.628.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -50,21 +50,13 @@ my $output = qx{../src/task rc:bug.rc waiting}; like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.'); # Cleanup. -unlink 'pending.data'; -ok (!-r 'pending.data', 'Removed pending.data'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); -unlink 'completed.data'; -ok (!-r 'completed.data', 'Removed completed.data'); - -unlink 'undo.data'; -ok (!-r 'undo.data', 'Removed undo.data'); - -unlink 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +exit 0; diff --git a/test/bug.634.t b/test/bug.634.t index e937afcee..b25ab444c 100755 --- a/test/bug.634.t +++ b/test/bug.634.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -49,23 +49,13 @@ my $output = qx{echo '-- n' |../src/task rc:bug.rc rc.confirmation=off undo}; unlike ($output, qr/Are you sure/ms, 'Undo honours confirmation=off.'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.635.t b/test/bug.635.t index 7e61e4874..315766d7a 100755 --- a/test/bug.635.t +++ b/test/bug.635.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -52,23 +52,13 @@ my $output = qx{../src/task rc:bug.rc ls 1}; like ($output, qr/Pay the rent on the 31st/ms, 'Global replace performed correctly.'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.649.t b/test/bug.649.t index f0587d304..5a8fd8ab0 100755 --- a/test/bug.649.t +++ b/test/bug.649.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -51,23 +51,13 @@ like ($output, qr/is neither pending nor waiting/, 'Parent task not completabl unlike ($output, qr/Completed 1/ms, 'New recurring task cannot be immediately completed.'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.656.t b/test/bug.656.t index e347fec3c..cc890e567 100755 --- a/test/bug.656.t +++ b/test/bug.656.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -56,23 +56,13 @@ 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.668.t b/test/bug.668.t index 0b8c42266..1d40b80a5 100755 --- a/test/bug.668.t +++ b/test/bug.668.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -49,23 +49,13 @@ unlike ($output, qr/not a valid modifier/, 'standard syntax with dots'); unlike ($output, qr/not in the expected format/, 'standard syntax with dots'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.674.t b/test/bug.674.t index 1f2235a5b..aba4ef73c 100755 --- a/test/bug.674.t +++ b/test/bug.674.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -50,26 +50,16 @@ qx{../src/task rc:bug.rc 1 done}; # Result: Immediately delete the created task my $output = qx{../src/task rc:bug.rc 2 done}; -like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done'); +like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.694.t b/test/bug.694.t index 41d508872..346f9dc6e 100755 --- a/test/bug.694.t +++ b/test/bug.694.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -51,23 +51,13 @@ like ($output, qr/foo/, 'found foo'); like ($output, qr/Due/, 'found Due'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.703.t b/test/bug.703.t index 5e040cfbc..2e5926f73 100755 --- a/test/bug.703.t +++ b/test/bug.703.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -61,23 +61,13 @@ like ($output, qr/AnnotatIon two/, 'new annotation two'); like ($output, qr/AnnotatIon three/, 'new annotation three'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.before.t b/test/bug.before.t index c999c2078..d5d917397 100755 --- a/test/bug.before.t +++ b/test/bug.before.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 17; # Create the rc file. if (open my $fh, '>', 'before.rc') @@ -81,23 +81,13 @@ unlike ($output, qr/foo/, 'no foo after 5/1/2009'); unlike ($output, qr/bar/, 'no bar after 5/1/2009'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'before.rc'; -ok (!-r 'before.rc', 'Removed before.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key before.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'before.rc', 'Cleanup'); exit 0; diff --git a/test/bug.bulk.t b/test/bug.bulk.t index 70a7fd496..2cc03a3dc 100755 --- a/test/bug.bulk.t +++ b/test/bug.bulk.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 12; # Create the rc file. if (open my $fh, '>', 'bulk.rc') @@ -70,23 +70,13 @@ like ($output, qr/Project\s+p1/, 'project applied to 6'); like ($output, qr/Priority\s+M/, 'priority applied to 6'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bulk.rc'; -ok (!-r 'bulk.rc', 'Removed bulk.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bulk.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bulk.rc', 'Cleanup'); exit 0; diff --git a/test/bug.c001.t b/test/bug.c001.t index 91ffa235b..f538ee6db 100755 --- a/test/bug.c001.t +++ b/test/bug.c001.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -52,23 +52,13 @@ my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.cal.t b/test/bug.cal.t index f6ce1ba28..08ca2b7ef 100755 --- a/test/bug.cal.t +++ b/test/bug.cal.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 34; +use Test::More tests => 29; # Create the rc file. if (open my $fh, '>', 'cal.rc') @@ -104,22 +104,12 @@ $output = qx{../src/task rc:cal.rc cal due 2010 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 donkey'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'cal.rc'; -ok (!-r 'cal.rc', 'Removed cal.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key cal.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'cal.rc', 'Cleanup'); exit 0; diff --git a/test/bug.hang.t b/test/bug.hang.t index 9f8ebfe8f..cba8e86ab 100755 --- a/test/bug.hang.t +++ b/test/bug.hang.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'hang.rc') @@ -70,26 +70,14 @@ if ($@ eq "alarm\n") } # Cleanup. -unlink 'shadow.txt'; -ok (!-r 'shadow.txt', 'Removed shadow.txt'); - -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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'hang.rc'; -ok (!-r 'hang.rc', 'Removed hang.rc'); +unlink qw(shadow.txt pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'shadow.txt' && + ! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.range.t b/test/bug.range.t index 897cbacf9..bbc269bac 100755 --- a/test/bug.range.t +++ b/test/bug.range.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'range.rc') @@ -49,23 +49,13 @@ like ($output, qr/two/, 'Found within range'); unlike ($output, qr/three/, 'Missing after range'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'range.rc'; -ok (!-r 'range.rc', 'Removed range.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key range.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'range.rc', 'Cleanup'); exit 0; diff --git a/test/bug.recur.t b/test/bug.recur.t index 4ac4236d5..45236ed3f 100755 --- a/test/bug.recur.t +++ b/test/bug.recur.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'recur.rc') @@ -45,23 +45,13 @@ my $output = qx{../src/task rc:recur.rc info 1}; unlike ($output, qr/Description\s+foo/, 'task not created - missing due date'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'recur.rc'; -ok (!-r 'recur.rc', 'Removed recur.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key recur.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'recur.rc', 'Cleanup'); exit 0; diff --git a/test/bug.sort.t b/test/bug.sort.t index 883d7b227..9b78d2c65 100755 --- a/test/bug.sort.t +++ b/test/bug.sort.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug_sort.rc') @@ -51,23 +51,13 @@ $output = qx{../src/task rc:bug_sort.rc list}; like ($output, qr/three.*one.*two/msi, 'list did not hang after pri:H on 1'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug_sort.rc'; -ok (!-r 'bug_sort.rc', 'Removed bug_sort.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug_sort.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug_sort.rc', 'Cleanup'); exit 0; diff --git a/test/bug.start.extra.t b/test/bug.start.extra.t index aa07898d3..c2e2a868e 100755 --- a/test/bug.start.extra.t +++ b/test/bug.start.extra.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'extra.rc') @@ -49,23 +49,13 @@ like ($output, qr/L/, 'Correct priority'); like ($output, qr/bar/, 'Correct annotation'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'extra.rc'; -ok (!-r 'extra.rc', 'Removed extra.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key extra.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'extra.rc', 'Cleanup'); exit 0; diff --git a/test/bug.summary.t b/test/bug.summary.t index d68b1e314..dc16a545c 100755 --- a/test/bug.summary.t +++ b/test/bug.summary.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'summary.rc') @@ -54,23 +54,13 @@ $output = qx{../src/task rc:summary.rc summary}; like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% after report'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'summary.rc'; -ok (!-r 'summary.rc', 'Removed summary.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key summary.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'summary.rc', 'Cleanup'); exit 0; diff --git a/test/cal.t b/test/cal.t index b8e616d2f..d2b06ca68 100755 --- a/test/cal.t +++ b/test/cal.t @@ -30,7 +30,7 @@ use strict; use warnings; -use Test::More tests => 89; +use Test::More tests => 84; # Create the rc file. if (open my $fh, '>', 'cal.rc') @@ -259,22 +259,12 @@ like ($output, qr/30;103m15/, 'Holiday BBBBBB is color-coded'); like ($output, qr/30;103m25/, 'Holiday åäö is color-coded'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'details.rc'; -ok (!-r 'details.rc', 'Removed details.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key details.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'details.rc', 'Cleanup'); exit 0; diff --git a/test/color.active.t b/test/color.active.t index f85a93ef4..3e755e6be 100755 --- a/test/color.active.t +++ b/test/color.active.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -50,23 +50,13 @@ like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.active'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.deprecated.t b/test/color.deprecated.t index 69628312e..c490c362f 100755 --- a/test/color.deprecated.t +++ b/test/color.deprecated.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -45,20 +45,13 @@ my $output = qx{../src/task rc:color.rc show}; like ($output, qr/that use deprecated underscores/ms, 'Deprecated color detected'); # Cleanup. -unlink 'pending.data'; -ok (!-r 'pending.data', 'Removed pending.data'); - -unlink 'undo.data'; -ok (!-r 'undo.data', 'Removed undo.data'); - -unlink 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.disable.t b/test/color.disable.t index 708e4dede..ca2ea9b63 100755 --- a/test/color.disable.t +++ b/test/color.disable.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -49,23 +49,13 @@ unlike ($output, qr/\033\[31m/, 'color.disable - no color red'); unlike ($output, qr/\033\[0m/, 'color.disable - no color reset'); # Cleanup. -unlink 'pending.data'; -ok (!-r 'pending.data', 'Removed pending.data'); - -unlink 'completed.data'; -ok (!-r 'completed.data', 'Removed completed.data'); - -unlink 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'undo.data'; -ok (!-r 'undo.data', 'Removed undo.data'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.due.t b/test/color.due.t index 20ff3e0aa..3af0a005c 100755 --- a/test/color.due.t +++ b/test/color.due.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -49,23 +49,13 @@ like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* not like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.duetoday.t b/test/color.duetoday.t index 0a64d2dbc..042e9002c 100755 --- a/test/color.duetoday.t +++ b/test/color.duetoday.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -49,23 +49,13 @@ like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* not like ($output, qr/ (?:\033\[31m|\033\[38;5;9m) .* red .* \033\[0m/x, 'color.due.today'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.keyword.t b/test/color.keyword.t index 10bf8e2d4..7ad0640d3 100755 --- a/test/color.keyword.t +++ b/test/color.keyword.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -59,23 +59,13 @@ like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.ke like ($output, qr/ \033\[33m .* annotation .* \033\[0m /x, 'color.keyword.yellow (annotation)'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.overdue.t b/test/color.overdue.t index e47e89d55..6eb04faf1 100755 --- a/test/color.overdue.t +++ b/test/color.overdue.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -49,23 +49,13 @@ like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* not like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.overdue'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.pri.t b/test/color.pri.t index 892252871..fbcf3e653 100755 --- a/test/color.pri.t +++ b/test/color.pri.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -57,23 +57,13 @@ like ($output, qr/ \033\[34m .* blue .* \033\[0m /x, 'color.pri.L'); like ($output, qr/ \033\[33m .* yellow .* \033\[0m /x, 'color.pri.none'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.project.t b/test/color.project.t index cb1e7e1b6..e3dfc0a6f 100755 --- a/test/color.project.t +++ b/test/color.project.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -51,23 +51,13 @@ like ($output, qr/ \033\[32m .* nothing .* \033\[0m /x, 'color.project.no like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.project.red'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.recurring.t b/test/color.recurring.t index fcfcf03b7..f3906fafa 100755 --- a/test/color.recurring.t +++ b/test/color.recurring.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -50,23 +50,13 @@ like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.recurring'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.tag.t b/test/color.tag.t index fa5643282..41b3aaeef 100755 --- a/test/color.tag.t +++ b/test/color.tag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -55,23 +55,13 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tag.red'); like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.tag.green'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/color.tagged.t b/test/color.tagged.t index f4b8d600d..903f10cb1 100755 --- a/test/color.tagged.t +++ b/test/color.tagged.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); @@ -53,23 +53,13 @@ like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tagged'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'color.rc'; -ok (!-r 'color.rc', 'Removed color.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key color.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'color.rc', 'Cleanup'); exit 0; diff --git a/test/config.obsolete.t b/test/config.obsolete.t index b5115c0aa..dcfc8a11f 100755 --- a/test/config.obsolete.t +++ b/test/config.obsolete.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'obsolete.rc') @@ -47,23 +47,13 @@ like ($output, qr/Your .taskrc file contains these unrecognized variables:\n/, like ($output, qr/ foo\n/, 'unsupported configuration variable'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'obsolete.rc'; -ok (!-r 'obsolete.rc', 'Removed obsolete.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key obsolete.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'obsolete.rc', 'Cleanup'); exit 0; diff --git a/test/custom.columns.t b/test/custom.columns.t index 3d167ea04..99583c78a 100755 --- a/test/custom.columns.t +++ b/test/custom.columns.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -47,23 +47,13 @@ my $output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/Unrecognized column name 'foo'\.\n/, 'custom report spotted invalid column'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'custom.rc'; -ok (!-r 'custom.rc', 'Removed custom.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key custom.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'custom.rc', 'Cleanup'); exit 0; diff --git a/test/custom.priority_long.t b/test/custom.priority_long.t index b42358daa..daf073f82 100755 --- a/test/custom.priority_long.t +++ b/test/custom.priority_long.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'pri.rc') @@ -54,23 +54,13 @@ like ($output, qr/2\s+Medium/, 'priority.long Medium'); like ($output, qr/3\s+Low/, 'priority.long Low'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'pri.rc'; -ok (!-r 'pri.rc', 'Removed pri.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key pri.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'pri.rc', 'Cleanup'); exit 0; diff --git a/test/custom.recur_ind.t b/test/custom.recur_ind.t index 48d1a257f..526ada91f 100755 --- a/test/custom.recur_ind.t +++ b/test/custom.recur_ind.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -55,23 +55,13 @@ 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'; -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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'custom.rc'; -ok (!-r 'custom.rc', 'Removed custom.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key custom.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'custom.rc', 'Cleanup'); exit 0; diff --git a/test/custom.t b/test/custom.t index db8adef88..e2d11c396 100755 --- a/test/custom.t +++ b/test/custom.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -53,23 +53,13 @@ like ($output, qr/one/, 'custom filter included'); unlike ($output, qr/two/, 'custom filter excluded'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'custom.rc'; -ok (!-r 'custom.rc', 'Removed custom.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key custom.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'custom.rc', 'Cleanup'); exit 0; diff --git a/test/custom.tag_ind.t b/test/custom.tag_ind.t index 4d45d6896..0425fdb2b 100755 --- a/test/custom.tag_ind.t +++ b/test/custom.tag_ind.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -55,23 +55,13 @@ like ($output, qr/1\s+TAG/, 'Custom ag indicator t1'); unlike ($output, qr/2\s+TAG/, 'No custom tag indicator t2'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'custom.rc'; -ok (!-r 'custom.rc', 'Removed custom.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key custom.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'custom.rc', 'Cleanup'); exit 0; diff --git a/test/dateformat.t b/test/dateformat.t index be54557ae..e0f41b59d 100755 --- a/test/dateformat.t +++ b/test/dateformat.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'date1.rc') @@ -81,29 +81,15 @@ $output = qx{../src/task rc:date3.rc rc.dateformat.report:"D b Y - a" list}; like ($output, qr/08 Apr 2010 - Thu/, 'date format D b Y - a parsed'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'date1.rc'; -ok (!-r 'date1.rc', 'Removed date1.rc'); - -unlink 'date2.rc'; -ok (!-r 'date2.rc', 'Removed date2.rc'); - -unlink 'date3.rc'; -ok (!-r 'date3.rc', 'Removed date3.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key date1.rc date2.rc date3.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'date1.rc' && + ! -r 'date2.rc' && + ! -r 'date3.rc', 'Cleanup'); exit 0; diff --git a/test/datesort.t b/test/datesort.t index 3ddbb1619..e9fc72e15 100755 --- a/test/datesort.t +++ b/test/datesort.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'datesort.rc') @@ -57,23 +57,13 @@ $output = qx{../src/task rc:datesort.rc rc.report.small_list.sort=due- small_lis like ($output, qr/three.+two.+one/ms, 'Sorting by due- with format MD works'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'datesort.rc'; -ok (!-r 'datesort.rc', 'Removed datesort.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key datesort.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'datesort.rc', 'Cleanup'); exit 0; diff --git a/test/denotate.t b/test/denotate.t index cea5b9a06..023691015 100755 --- a/test/denotate.t +++ b/test/denotate.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 32; +use Test::More tests => 27; # Create the rc file. if (open my $fh, '>', 'denotate.rc') @@ -100,22 +100,12 @@ like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Delet unlike ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit and Miss Piggy/ms, 'Delete partial match - Kermit and Miss Piggy'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'denotate.rc'; -ok (!-r 'denotate.rc', 'Removed denotate.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key denotate.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'denotate.rc', 'Cleanup'); exit 0; diff --git a/test/dependencies.t b/test/dependencies.t index d1d45852d..9505bb79b 100755 --- a/test/dependencies.t +++ b/test/dependencies.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 43; +use Test::More tests => 38; # Create the rc file. if (open my $fh, '>', 'dep.rc') @@ -224,23 +224,13 @@ like ($output, qr/\s1\s+One\s*\n\s2\s+Four\s*\n\s3\s+2\s+Five/, 'dependencies - # TODO - test depend.any and depend.none report filters # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'dep.rc'; -ok (!-r 'dep.rc', 'Removed dep.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key dep.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'dep.rc', 'Cleanup'); exit 0; diff --git a/test/due.t b/test/due.t index 983df4ea4..a5c4b52c9 100755 --- a/test/due.t +++ b/test/due.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'due.rc') @@ -65,23 +65,13 @@ $output = qx{../src/task rc:due.rc list due.is:today}; like ($output, qr/three/, 'due.is:today works as a filter'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'due.rc'; -ok (!-r 'due.rc', 'Removed due.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key due.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'due.rc', 'Cleanup'); exit 0; diff --git a/test/duplicate.t b/test/duplicate.t index 0f9a661f6..c7dcd5f3d 100755 --- a/test/duplicate.t +++ b/test/duplicate.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 12; # Create the rc file. if (open my $fh, '>', 'dup.rc') @@ -61,23 +61,13 @@ like ($output, qr/Duplicated\stask\s1\s'foo'/, 'duplicate output task id and des like ($output, qr/Created\s+task\s+4/, 'duplicate output of new task 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'dup.rc'; -ok (!-r 'dup.rc', 'Removed dup.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key dup.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'dup.rc', 'Cleanup'); exit 0; diff --git a/test/enpassant.t b/test/enpassant.t index 1b7691e2a..2d0a38610 100755 --- a/test/enpassant.t +++ b/test/enpassant.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'enp.rc') @@ -54,23 +54,13 @@ like ($output, qr/Priority\s+H/, 'en passant 2 description change'); like ($output, qr/Tags\s+tag/, 'en passant 2 description change'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'enp.rc'; -ok (!-r 'enp.rc', 'Removed enp.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key enp.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'enp.rc', 'Cleanup'); exit 0; diff --git a/test/feature.559.t b/test/feature.559.t index 0cc4db65e..95074ff23 100755 --- a/test/feature.559.t +++ b/test/feature.559.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -49,23 +49,13 @@ $output = qx{../src/task rc:bug.rc rc.data.location=donkey list}; like ($output, qr/Error.+does not exist/, 'Error on missing rc.data.location'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/feature.608.t b/test/feature.608.t index a81561851..f7ab6ed80 100755 --- a/test/feature.608.t +++ b/test/feature.608.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'bug.rc') @@ -52,23 +52,13 @@ my $output = qx{../src/task rc:bug.rc info 1}; like ($output, qr/End set to/ms, 'Done command also stops started task.'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'bug.rc'; -ok (!-r 'bug.rc', 'Removed bug.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/feature.exit.t b/test/feature.exit.t index b4f73874f..ca4f093bc 100755 --- a/test/feature.exit.t +++ b/test/feature.exit.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'exit.rc') @@ -46,23 +46,13 @@ my $exit_bad = system ('../src/task rc:exit.rc ls bar 2>&1 >>/dev/null'); isnt ($exit_bad, 0, 'task returns non-zero on failure'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'exit.rc'; -ok (!-r 'exit.rc', 'Removed exit.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key exit.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'exit.rc', 'Cleanup'); exit 0; diff --git a/test/filter-prefix.t b/test/filter-prefix.t index 736d6ba36..842b0624f 100755 --- a/test/filter-prefix.t +++ b/test/filter-prefix.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 63; +use Test::More tests => 58; # Create the rc file. if (open my $fh, '>', 'filter.rc') @@ -119,23 +119,13 @@ like ($output, qr/seven/, 'i7'); like ($output, qr/eight/, 'i8'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'filter.rc'; -ok (!-r 'filter.rc', 'Removed filter.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key filter.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'filter.rc', 'Cleanup'); exit 0; diff --git a/test/filter.t b/test/filter.t index 546c93031..bed1a206a 100755 --- a/test/filter.t +++ b/test/filter.t @@ -28,8 +28,8 @@ use strict; use warnings; -#use Test::More tests => 180; -use Test::More tests => 133; +#use Test::More tests => 175; +use Test::More tests => 128; # Create the rc file. if (open my $fh, '>', 'filter.rc') @@ -275,23 +275,13 @@ unlike ($output, qr/seven/, 'r7'); #unlike ($output, qr/seven/, 'y7'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'filter.rc'; -ok (!-r 'filter.rc', 'Removed filter.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key filter.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'filter.rc', 'Cleanup'); exit 0; diff --git a/test/fontunderline.t b/test/fontunderline.t index 88f5c232f..c895d6f6b 100755 --- a/test/fontunderline.t +++ b/test/fontunderline.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'font.rc') @@ -73,23 +73,13 @@ $output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:on rc.font unlike ($output, qr/--------/, '1,1,1 -> underline'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'font.rc'; -ok (!-r 'font.rc', 'Removed font.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key font.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'font.rc', 'Cleanup'); exit 0; diff --git a/test/history.annual.t b/test/history.annual.t index a87e9c308..1e2ee8bdc 100755 --- a/test/history.annual.t +++ b/test/history.annual.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'time.rc') @@ -68,22 +68,12 @@ like ($output, qr/2\s+3\s+3\s+-4/, 'history.annual - this year'); like ($output, qr/4\s+2\s+1\s+1/, 'history.annual - average'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'time.rc'; -ok (!-r 'time.rc', 'Removed time.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key time.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'time.rc', 'Cleanup'); exit 0; diff --git a/test/history.monthly.t b/test/history.monthly.t index fea48ba9c..2d4b46f80 100755 --- a/test/history.monthly.t +++ b/test/history.monthly.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'time.rc') @@ -68,22 +68,12 @@ like ($output, qr/2\s+3\s+3\s+-4/, 'history.monthly - this month'); like ($output, qr/4\s+2\s+1\s+1/, 'history.monthly - average'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'time.rc'; -ok (!-r 'time.rc', 'Removed time.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key time.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'time.rc', 'Cleanup'); exit 0; diff --git a/test/hook.on-exit.t b/test/hook.on-exit.t index 2b13a91b1..0b21ae3b2 100755 --- a/test/hook.on-exit.t +++ b/test/hook.on-exit.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'hook.rc') @@ -61,26 +61,14 @@ else } # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'hook'; -ok (!-r 'hook', 'Removed hook'); - -unlink 'hook.rc'; -ok (!-r 'hook.rc', 'Removed hook.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key hook hook.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'hook' && + ! -r 'hook.rc', 'Cleanup'); exit 0; diff --git a/test/hook.on-launch.t b/test/hook.on-launch.t index fbf35a86d..6ca7f16f3 100755 --- a/test/hook.on-launch.t +++ b/test/hook.on-launch.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'hook.rc') @@ -81,5 +81,15 @@ ok (!-r 'hook', 'Removed hook'); unlink 'hook.rc'; ok (!-r 'hook.rc', 'Removed hook.rc'); +# Cleanup. +unlink qw(pending.data completed.data undo.data backlog.data synch.key hook hook.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'hook' && + ! -r 'hook.rc', 'Cleanup'); + exit 0; diff --git a/test/ids.t b/test/ids.t index 552a91f76..092630e99 100755 --- a/test/ids.t +++ b/test/ids.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'ids.rc') @@ -56,23 +56,13 @@ $output = qx{../src/task rc:ids.rc ids +A -B}; like ($output, qr/^2$/ms, 'ids +A -B --> 2'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'ids.rc'; -ok (!-r 'ids.rc', 'Removed ids.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key ids.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'ids.rc', 'Cleanup'); exit 0; diff --git a/test/label.t b/test/label.t index 492e761a2..ca6f25cfa 100755 --- a/test/label.t +++ b/test/label.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -56,23 +56,13 @@ like ($output, qr/one/, 'custom filter included'); unlike ($output, qr/two/, 'custom filter excluded'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'custom.rc'; -ok (!-r 'custom.rc', 'Removed custom.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key custom.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'custom.rc', 'Cleanup'); exit 0; diff --git a/test/limit.t b/test/limit.t index 4e6afd14e..77d881da6 100755 --- a/test/limit.t +++ b/test/limit.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'limit.rc') @@ -83,23 +83,13 @@ $output = qx{../src/task rc:limit.rc ls limit:page}; like ($output, qr/^30 tasks, truncated to 18 lines$/ms, 'limited to page'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'limit.rc'; -ok (!-r 'limit.rc', 'Removed limit.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key limit.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'limit.rc', 'Cleanup'); exit 0; diff --git a/test/log.t b/test/log.t index 8c49dc03c..8ed4d24ea 100755 --- a/test/log.t +++ b/test/log.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'log.rc') @@ -45,23 +45,13 @@ my $output = qx{../src/task rc:log.rc completed}; like ($output, qr/This is a test/, 'log description'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'log.rc'; -ok (!-r 'log.rc', 'Removed log.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key log.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'log.rc', 'Cleanup'); exit 0; diff --git a/test/nag.t b/test/nag.t index efda3bcb0..7c6ccb1fd 100755 --- a/test/nag.t +++ b/test/nag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'nag.rc') @@ -55,23 +55,13 @@ like (qx{../src/task rc:nag.rc 2 do}, qr/NAG/, 'do due:tomorrow -> nag'); unlike (qx{../src/task rc:nag.rc 1 do}, qr/NAG/, 'do due:yesterday -> no nag'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'nag.rc'; -ok (!-r 'nag.rc', 'Removed nag.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key nag.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'nag.rc', 'Cleanup'); exit 0; diff --git a/test/next.t b/test/next.t index d9e67116f..f816c8e45 100755 --- a/test/next.t +++ b/test/next.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'next.rc') @@ -51,23 +51,13 @@ like ($output, qr/AH/, 'AH shown'); like ($output, qr/BH/, 'BH shown'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'next.rc'; -ok (!-r 'next.rc', 'Removed next.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key next.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'next.rc', 'Cleanup'); exit 0; diff --git a/test/oldest.t b/test/oldest.t index 1125aa1f1..d0394c145 100755 --- a/test/oldest.t +++ b/test/oldest.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 59; +use Test::More tests => 54; # Create the rc file. if (open my $fh, '>', 'oldest.rc') @@ -128,23 +128,13 @@ like ($output, qr/ten/, 'newest: ten'); like ($output, qr/eleven/, 'newest: eleven'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'oldest.rc'; -ok (!-r 'oldest.rc', 'Removed oldest.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key oldest.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'oldest.rc', 'Cleanup'); exit 0; diff --git a/test/overdue.t b/test/overdue.t index 95280be70..e8f3ffa6f 100755 --- a/test/overdue.t +++ b/test/overdue.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'due.rc') @@ -50,23 +50,13 @@ unlike ($output, qr/two/, 'overdue: task 2 does not show up'); unlike ($output, qr/three/, 'overdue: task 3 does not show up'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'due.rc'; -ok (!-r 'due.rc', 'Removed due.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key due.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'due.rc', 'Cleanup'); exit 0; diff --git a/test/override.t b/test/override.t index bb8f38411..27ff4a0e4 100755 --- a/test/override.t +++ b/test/override.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 3; # Create the rc file. if (open my $fh, '>', 'or.rc') @@ -51,23 +51,13 @@ my $output = qx{../src/task rc:or.rc zzz}; like ($output, qr/ONE.+TWO/ms, 'filter override > rc setting'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'or.rc'; -ok (!-r 'or.rc', 'Removed or.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key or.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'or.rc', 'Cleanup'); exit 0; diff --git a/test/pri_sort.t b/test/pri_sort.t index 5a284f521..496d6fe3c 100755 --- a/test/pri_sort.t +++ b/test/pri_sort.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 39; +use Test::More tests => 34; # Create the rc file. if (open my $fh, '>', 'pri.rc') @@ -93,23 +93,13 @@ $output = qx{../src/task rc:pri.rc ls priority.over:}; unlike ($output, qr/_/, 'pri _ !> _'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'pri.rc'; -ok (!-r 'pri.rc', 'Removed pri.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key pri.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'pri.rc', 'Cleanup'); exit 0; diff --git a/test/project.t b/test/project.t index bdff57a66..c7800ab91 100755 --- a/test/project.t +++ b/test/project.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 11; # Create the rc file. if (open my $fh, '>', 'pro.rc') @@ -67,23 +67,13 @@ $output = qx{../src/task rc:pro.rc 3 modify pro:\\"foo bar\\"}; like ($output, qr/The project 'foo bar' has changed\./, 'project with spaces'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'pro.rc'; -ok (!-r 'pro.rc', 'Removed pro.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key pro.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'pro.rc', 'Cleanup'); exit 0; diff --git a/test/recur.limit.t b/test/recur.limit.t index a0251c400..fff4abf7b 100755 --- a/test/recur.limit.t +++ b/test/recur.limit.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'recur.rc') @@ -51,23 +51,13 @@ $output = qx{../src/task rc:recur.rc rc.recurrence.limit:4 long}; is (scalar @tasks, 4, 'recurrence.limit override to 4'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'recur.rc'; -ok (!-r 'recur.rc', 'Removed recur.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key recur.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'recur.rc', 'Cleanup'); exit 0; diff --git a/test/recur.t b/test/recur.t index 6901762c3..02ac6a1a3 100755 --- a/test/recur.t +++ b/test/recur.t @@ -28,49 +28,68 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'recur.rc') { print $fh "data.location=.\n", - "report.asc.columns=id,recur,description\n", - "report.asc.sort=recur+\n", - "report.desc.columns=id,recur,description\n", - "report.desc.sort=recur-\n"; + "recurrent.limit=1\n"; close $fh; ok (-r 'recur.rc', 'Created recur.rc'); } -# Create a few recurring tasks, and test the sort order of the recur column. -qx{../src/task rc:recur.rc add due:tomorrow recur:daily first}; -qx{../src/task rc:recur.rc add due:tomorrow recur:weekly second}; -qx{../src/task rc:recur.rc add due:tomorrow recur:3d third}; +# Create a recurring and non-recurring task. +qx{../src/task rc:recur.rc add simple}; +qx{../src/task rc:recur.rc add complex due:today recur:daily}; -my $output = qx{../src/task rc:recur.rc asc}; -like ($output, qr/first .* third .* second/msx, 'daily 3d weekly'); +# List tasks to generate child tasks. Should result in: +# 1 simple +# 3 complex +# 4 complex +my $output = qx{../src/task rc:recur.rc minimal}; +like ($output, qr/1.+simple$/ms, '1 simple'); +like ($output, qr/3.+complex$/ms, '3 complex'); +like ($output, qr/4.+complex$/ms, '4 complex'); -$output = qx{../src/task rc:recur.rc desc}; -like ($output, qr/second .* third .* first/msx, 'weekly 3d daily'); +# TODO Modify a child task and do not propagate the change. +$output = qx{echo '-- n' | ../src/task rc:recur.rc 3 modify complex2}; +diag ('---'); +diag ($output); +diag ('---'); + +# TODO Modify a child task and propagate the change. +$output = qx{echo '-- y' | ../src/task rc:recur.rc 3 modify complex2}; +diag ('---'); +diag ($output); +diag ('---'); + +# TODO Delete a child task. +$output = qx{echo '-- n' | ../src/task rc:recur.rc 3 delete}; +diag ('---'); +diag ($output); +diag ('---'); + +# TODO Delete a recurring task. +$output = qx{echo '-- y' | ../src/task rc:recur.rc 4 delete}; +diag ('---'); +diag ($output); +diag ('---'); + +# TODO Wait a recurring task +# TODO Upgrade a task to a recurring task +# TODO Downgrade a recurring task to a regular task +# TODO Duplicate a recurring child task +# TODO Duplicate a recurring parent task # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'recur.rc'; -ok (!-r 'recur.rc', 'Removed recur.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key recur.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'recur.rc', 'Cleanup'); exit 0; diff --git a/test/recur.weekdays.t b/test/recur.weekdays.t index bb90bf62d..442493e1a 100755 --- a/test/recur.weekdays.t +++ b/test/recur.weekdays.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 4; # Create the rc file. if (open my $fh, '>', 'recur.rc') @@ -50,23 +50,13 @@ qx{../src/task rc:recur.rc 1 do}; $output = qx{../src/task rc:recur.rc list}; # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'recur.rc'; -ok (!-r 'recur.rc', 'Removed recur.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key recur.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'recur.rc', 'Cleanup'); exit 0; diff --git a/test/sequence.t b/test/sequence.t index e2fe354b2..49d511c51 100755 --- a/test/sequence.t +++ b/test/sequence.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 31; +use Test::More tests => 26; # Create the rc file. if (open my $fh, '>', 'seq.rc') @@ -118,23 +118,13 @@ $output = qx{../src/task rc:seq.rc info 2}; like ($output, qr/\d+\/\d+\/\d+ note/, 'sequence 2 annotate'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'seq.rc'; -ok (!-r 'seq.rc', 'Removed seq.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key seq.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'seq.rc', 'Cleanup'); exit 0; diff --git a/test/shadow.t b/test/shadow.t index b7811fa1d..ff0a2048d 100755 --- a/test/shadow.t +++ b/test/shadow.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More tests => 18; # Create the rc file. if (open my $fh, '>', 'shadow.rc') @@ -70,26 +70,14 @@ like ($file, qr/Unique tags\s+0\n/, 'Unique tags 0'); like ($file, qr/Projects\s+0\n/, 'Projects 0'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'shadow.rc'; -ok (!-r 'shadow.rc', 'Removed shadow.rc'); - -unlink 'shadow.txt'; -ok (!-r 'shadow.txt', 'Removed shadow.txt'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key shadow.txt shadow.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'shadow.txt' && + ! -r 'shadow.rc', 'Cleanup'); exit 0; diff --git a/test/sorting.t b/test/sorting.t index eb887f278..f87471fb1 100755 --- a/test/sorting.t +++ b/test/sorting.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 105; +use Test::More tests => 100; # Create the rc file. if (open my $fh, '>', 'sorting.rc') @@ -177,23 +177,13 @@ for my $sort (sort keys %tests) } # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'sorting.rc'; -ok (!-r 'sorting.rc', 'Removed sorting.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key sorting.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'sorting.rc', 'Cleanup'); exit 0; diff --git a/test/special.t b/test/special.t index 91c19392a..bd485d6fa 100755 --- a/test/special.t +++ b/test/special.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'special.rc') @@ -57,23 +57,13 @@ $output = qx{../src/task rc:special.rc 2 done}; unlike ($output, qr/NAG/, '+nonag suppressed nagging for task 2'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'special.rc'; -ok (!-r 'special.rc', 'Removed special.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key special.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'special.rc', 'Cleanup'); exit 0; diff --git a/test/start.t b/test/start.t index 8433a56b2..51b543939 100755 --- a/test/start.t +++ b/test/start.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More tests => 17; # Create the rc file. if (open my $fh, '>', 'start.rc') @@ -102,30 +102,15 @@ $output = qx{../src/task rc:start3.rc list}; like ($output, qr/Nu.+stannar.+vi/ms, 'one stopped and annotated with custom description'); # Cleanup. -ok (-r 'pending.data', 'Need to remove pending.data'); -unlink 'pending.data'; -ok (!-r 'pending.data', 'Removed pending.data'); - -ok (-r 'completed.data', 'Need to remove completed.data'); -unlink 'completed.data'; -ok (!-r 'completed.data', 'Removed completed.data'); - -ok (-r 'undo.data', 'Need to remove undo.data'); -unlink 'undo.data'; -ok (!-r 'undo.data', 'Removed undo.data'); - -unlink 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'start.rc'; -ok (!-r 'start.rc', 'Removed start.rc'); -unlink 'start2.rc'; -ok (!-r 'start2.rc', 'Removed start2.rc'); -unlink 'start3.rc'; -ok (!-r 'start3.rc', 'Removed start3.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key start.rc start2.rc start3.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'start.rc' && + ! -r 'start2.rc' && + ! -r 'start3.rc', 'Cleanup'); exit 0; diff --git a/test/subproject.t b/test/subproject.t index e9ab674be..90d8c9140 100755 --- a/test/subproject.t +++ b/test/subproject.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'sp.rc') @@ -63,23 +63,13 @@ $output = qx{../src/task rc:sp.rc list project:abcd}; like ($output, qr/No matches./, 'abc,ab,a,b | abcd -> nul'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'sp.rc'; -ok (!-r 'sp.rc', 'Removed sp.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key sp.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'sp.rc', 'Cleanup'); exit 0; diff --git a/test/tag.t b/test/tag.t index 017ce416c..50ccb26c8 100755 --- a/test/tag.t +++ b/test/tag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'tag.rc') @@ -63,23 +63,13 @@ $output = qx{../src/task rc:tag.rc 1 modify -missing; ../src/task rc:tag.rc info unlike ($output, qr/^Tags/m, '-missing NOP'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'tag.rc'; -ok (!-r 'tag.rc', 'Removed tag.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key tag.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'tag.rc', 'Cleanup'); exit 0; diff --git a/test/undo.t b/test/undo.t index 61cc0800f..4358cd2dc 100755 --- a/test/undo.t +++ b/test/undo.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'undo.rc') @@ -57,26 +57,13 @@ $output = qx{../src/task rc:undo.rc 1 do; ../src/task rc:undo.rc list}; like ($output, qr/No matches/, 'No matches'); # Cleanup. -ok (-r 'pending.data', 'Need to remove pending.data'); -unlink 'pending.data'; -ok (!-r 'pending.data', 'Removed pending.data'); - -ok (-r 'completed.data', 'Need to remove completed.data'); -unlink 'completed.data'; -ok (!-r 'completed.data', 'Removed completed.data'); - -ok (-r 'undo.data', 'Need to remove undo.data'); -unlink 'undo.data'; -ok (!-r 'undo.data', 'Removed undo.data'); - -unlink 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'undo.rc'; -ok (!-r 'undo.rc', 'Removed undo.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key undo.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'undo.rc', 'Cleanup'); exit 0; diff --git a/test/urgency.t b/test/urgency.t index 0e658a612..ed4cc49d2 100755 --- a/test/urgency.t +++ b/test/urgency.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 51; +use Test::More tests => 46; # Create the rc file. if (open my $fh, '>', 'urgency.rc') @@ -301,22 +301,12 @@ $output = qx{../src/task rc:urgency.rc 43 _urgency}; like ($output, qr/urgency 28$/ms, '+TAG = 28'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'urgency.rc'; -ok (!-r 'urgency.rc', 'Removed urgency.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key urgency.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'urgency.rc', 'Cleanup'); exit 0; diff --git a/test/utf8.t b/test/utf8.t index 86b3a957f..5874eea13 100755 --- a/test/utf8.t +++ b/test/utf8.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'utf8.rc') @@ -70,23 +70,13 @@ $output = qx{../src/task rc:utf8.rc ls +Zwölf}; like ($output, qr/utf8 in tag/, 'utf8 in tag works'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'utf8.rc'; -ok (!-r 'utf8.rc', 'Removed utf8.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key utf8.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'utf8.rc', 'Cleanup'); exit 0; diff --git a/test/wait.t b/test/wait.t index 84fb0d583..466424cf2 100755 --- a/test/wait.t +++ b/test/wait.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 18; +use Test::More tests => 13; # Create the rc file. if (open my $fh, '>', 'wait.rc') @@ -78,22 +78,12 @@ $output = qx{../src/task rc:wait.rc add Complain due:today wait:tomorrow}; like ($output, qr/Warning: You have specified a 'wait' date that is after the 'due' date\./, 'warning on wait after due'); # 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 'backlog.data'; -ok (!-r 'backlog.data', 'Removed backlog.data'); - -unlink 'synch.key'; -ok (!-r 'synch.key', 'Removed synch.key'); - -unlink 'wait.rc'; -ok (!-r 'wait.rc', 'Removed wait.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key wait.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'wait.rc', 'Cleanup'); exit 0;