diff --git a/test/list.all.projects.t b/test/list.all.projects.t index d1591985a..f65a173da 100755 --- a/test/list.all.projects.t +++ b/test/list.all.projects.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, '>', 'projects.rc') @@ -43,6 +43,7 @@ if (open my $fh, '>', 'projects.rc') qx{../src/task rc:projects.rc add project:p1 one}; qx{../src/task rc:projects.rc add project:p2 two}; qx{../src/task rc:projects.rc 1 done}; + my $output = qx{../src/task rc:projects.rc ls}; unlike ($output, qr/p1/, 'p1 done'); like ($output, qr/p2/, 'p2 pending'); @@ -56,23 +57,13 @@ like ($output, qr/p1/, 'p1 listed'); like ($output, qr/p2/, 'p2 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 'projects.rc'; -ok (!-r 'projects.rc', 'Removed projects.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key projects.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch_key.data' && + ! -r 'projects.rc', 'Cleanup'); exit 0; diff --git a/test/list.all.tags.t b/test/list.all.tags.t index b84858b99..b7bf74120 100755 --- a/test/list.all.tags.t +++ b/test/list.all.tags.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, '>', 'tags.rc') @@ -57,23 +57,13 @@ like ($output, qr/t1/, 't1 listed'); like ($output, qr/t2/, 't2 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 'tags.rc'; -ok (!-r 'tags.rc', 'Removed tags.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key tags.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch_key.data' && + ! -r 'tags.rc', 'Cleanup'); exit 0;