diff --git a/test/bug.360.t b/test/bug.360.t index a56edacf7..eb2b01086 100755 --- a/test/bug.360.t +++ b/test/bug.360.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') @@ -65,23 +65,13 @@ $output = qx{../src/task rc:bug.rc $id modify due:}; unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring 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.data' && + ! -r 'bug.rc', 'Cleanup'); exit 0; diff --git a/test/bug.580.t b/test/bug.580.t index df7b482af..9437e4900 100755 --- a/test/bug.580.t +++ b/test/bug.580.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More tests => 11; use File::Copy; use constant false => 0; @@ -73,47 +73,32 @@ my $output = qx{../src/task rc:remote.rc ls}; like ($output, qr/local task/, "autopush failed"); # Cleanup. -unlink 'local/pending.data'; -ok (!-r 'local/pending.data', 'Removed local/pending.data'); +unlink qw(local/pending.data local/completed.data local/undo.data local/undo.save local/backlog.data local/synch.key local.rc); +ok (! -r 'local/pending.data' && + ! -r 'local/completed.data' && + ! -r 'local/undo.data' && + ! -r 'local/undo.save' && + ! -r 'local/backlog.data' && + ! -r 'local/synch_key.data' && + ! -r 'local.rc', 'Cleanup'); -unlink 'local/completed.data'; -ok (!-r 'local/completed.data', 'Removed local/completed.data'); +unlink qw(remote/pending.data remote/completed.data remote/undo.data remote/backlog.data remote/synch.key remote.rc); +ok (! -r 'remote/pending.data' && + ! -r 'remote/completed.data' && + ! -r 'remote/undo.data' && + ! -r 'remote/backlog.data' && + ! -r 'remote/synch_key.data' && + ! -r 'remote.rc', 'Cleanup'); -unlink 'local/undo.data'; -ok (!-r 'local/undo.data', 'Removed local/undo.data'); - -unlink 'local/undo.save'; -ok (!-r 'local/undo.save', 'Removed local/undo.save'); - -unlink 'local/backlog.data'; -ok (!-r 'local/backlog.data', 'Removed local/backlog.data'); - -unlink 'local/synch.key'; -ok (!-r 'local/synch.key', 'Removed local/synch.key'); - -unlink 'local.rc'; -ok (!-r 'local.rc', 'Removed local.rc'); - -unlink 'remote/pending.data'; -ok (!-r 'remote/pending.data', 'Removed remote/pending.data'); - -unlink 'remote/completed.data'; -ok (!-r 'remote/completed.data', 'Removed remote/completed.data'); - -unlink 'remote/undo.data'; -ok (!-r 'remote/undo.data', 'Removed remote/undo.data'); - -unlink 'remote/backlog.data'; -ok (!-r 'remote/backlog.data', 'Removed remote/backlog.data'); - -unlink 'remote/synch.key'; -ok (!-r 'remote/synch.key', 'Removed remote/synch.key'); - -unlink 'remote.rc'; -ok (!-r 'remote.rc', 'Removed remote.rc'); +rmdir("remote/extensions"); +ok (!-e "remote/extensions", "Removed dir remote/extensions"); rmdir("remote"); ok (!-e "remote", "Removed dir remote"); + +rmdir("local/extensions"); +ok (!-e "local/extensions", "Removed dir local/extensions"); + rmdir("local"); ok (!-e "local", "Removed dir local"); diff --git a/test/delete.t b/test/delete.t index 5bcb15085..15d86e694 100755 --- a/test/delete.t +++ b/test/delete.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 14; # Create the rc file. if (open my $fh, '>', 'delete.rc') @@ -71,26 +71,13 @@ like ($output, qr/foo/, 'Deletion annotation successful'); like ($output, qr/H/, 'Deletion modification successful'); # 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 'delete.rc'; -ok (!-r 'delete.rc', 'Removed delete.rc'); +unlink qw(pending.data completed.data undo.data backlog.data synch.key delete.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch_key.data' && + ! -r 'delete.rc', 'Cleanup'); exit 0; diff --git a/test/import.yaml.t b/test/import.yaml.t index c5f3985e5..b003a3f99 100755 --- a/test/import.yaml.t +++ b/test/import.yaml.t @@ -118,7 +118,7 @@ task: EOF close $fh; - ok (-r 'import2.txt', 'Created second sample import data'); + ok (-r 'import.txt', 'Created second sample import data'); } # Convert YAML --> task JSON.