From 72ceee198a3019e794e6cf65a71edf6359fa3f25 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 May 2014 21:41:18 -0400 Subject: [PATCH] Unit Tests - Updated a test to use a command of length >= rc.abbreviation.minimum. - Removed useless setup/teardown tests. --- test/undo.t | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/undo.t b/test/undo.t index e0de7fcd6..f3c6909a9 100755 --- a/test/undo.t +++ b/test/undo.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 20; +use Test::More tests => 18; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -39,7 +39,6 @@ if (open my $fh, '>', 'undo.rc') print $fh "data.location=.\n", "confirmation=no\n"; close $fh; - ok (-r 'undo.rc', 'Created undo.rc'); } # Test the add/done/undo commands. @@ -55,7 +54,7 @@ $output = qx{../src/task rc:undo.rc undo 2>&1; ../src/task rc:undo.rc info 1 2>& ok (-r 'completed.data', 'completed.data created'); like ($output, qr/Status\s+Pending\n/, 'Pending'); -$output = qx{../src/task rc:undo.rc 1 do 2>&1; ../src/task rc:undo.rc list 2>&1 >/dev/null}; +$output = qx{../src/task rc:undo.rc 1 done 2>&1; ../src/task rc:undo.rc list 2>&1 >/dev/null}; like ($output, qr/No matches/, 'No matches'); # Bug 1060: Test that if undo is given an argument it catches and reports the correct error. @@ -96,10 +95,4 @@ else # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data undo.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'undo.rc', 'Cleanup'); - exit 0;