diff --git a/test/bug.annotate.t b/test/bug.annotate.t index 2c168919e..3b541d963 100755 --- a/test/bug.annotate.t +++ b/test/bug.annotate.t @@ -41,7 +41,7 @@ if (open my $fh, '>', 'bug_annotate.rc') # Attempt a blank annotation. qx{../src/task rc:bug_annotate.rc add foo}; my $output = qx{../src/task rc:bug_annotate.rc 1 annotate}; -like ($output, qr/Cannot apply a blank annotation./, 'failed on blank annotation'); +like ($output, qr/Additional text must be provided/, 'failed on blank annotation'); # Attempt an annotation without ID $output = qx{../src/task rc:bug_annotate.rc annotate bar}; diff --git a/test/bug.start.extra.t b/test/bug.start.extra.t index b8ddf153a..0a835ec57 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 => 9; +use Test::More tests => 11; # Create the rc file. if (open my $fh, '>', 'extra.rc') @@ -40,10 +40,13 @@ if (open my $fh, '>', 'extra.rc') } qx{../src/task rc:extra.rc add foo}; -my $output = qx{../src/task rc:extra.rc 1 start pri:L}; -like ($output, qr/The 'start' command does not allow further modification of a task\./, 'no modifications allowed for start'); -$output = qx{../src/task rc:extra.rc 1 stop pro:bar}; -like ($output, qr/The 'stop' command does not allow further modification of a task\./, 'no modifications allowed for stop'); +qx{../src/task rc:extra.rc 1 start pri:L}; +qx{../src/task rc:extra.rc 1 stop pro:bar}; +my $output = qx{../src/task rc:extra.rc list}; +like ($output, qr/foo/, 'Task shown'); +like ($output, qr/1 task/, 'Correct count'); +like ($output, qr/L/, 'Correct priority'); +like ($output, qr/bar/, 'Correct annotation'); # Cleanup. unlink 'pending.data'; diff --git a/test/info.t b/test/info.t deleted file mode 100755 index cda4b4cc4..000000000 --- a/test/info.t +++ /dev/null @@ -1,77 +0,0 @@ -#! /usr/bin/perl -################################################################################ -## taskwarrior - a command line task list manager. -## -## Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. -## All rights reserved. -## -## This program is free software; you can redistribute it and/or modify it under -## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 2 of the License, or (at your option) any later -## version. -## -## This program is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -## FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -## details. -## -## You should have received a copy of the GNU General Public License along with -## this program; if not, write to the -## -## Free Software Foundation, Inc., -## 51 Franklin Street, Fifth Floor, -## Boston, MA -## 02110-1301 -## USA -## -################################################################################ - -use strict; -use warnings; -use Test::More tests => 13; - -# Create the rc file. -if (open my $fh, '>', 'info.rc') -{ - print $fh "data.location=.\n", - "confirmation=off\n"; - close $fh; - ok (-r 'info.rc', 'Created info.rc'); -} - -# Test the add command. -qx{../src/task rc:info.rc add test one}; -qx{../src/task rc:info.rc add test two}; -qx{../src/task rc:info.rc add test three}; - -my $output = qx{../src/task rc:info.rc 1}; -like ($output, qr/Description\s+test one\n/, 'single auto-info one'); -unlike ($output, qr/Description\s+test two\n/, 'single auto-info !two'); -unlike ($output, qr/Description\s+test three\n/, 'single auto-info !three'); - -$output = qx{../src/task rc:info.rc 1-2}; -like ($output, qr/Description\s+test one\n/, 'single auto-info one'); -like ($output, qr/Description\s+test two\n/, 'single auto-info two'); -unlike ($output, qr/Description\s+test three\n/, 'single auto-info !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 'info.rc'; -ok (!-r 'info.rc', 'Removed info.rc'); - -exit 0; - diff --git a/test/log.t b/test/log.t index d689649d4..30cdd193e 100755 --- a/test/log.t +++ b/test/log.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'log.rc') @@ -41,11 +41,8 @@ if (open my $fh, '>', 'log.rc') # Test the log command. qx{../src/task rc:log.rc log This is a test}; -my $output = qx{../src/task rc:log.rc info 1}; -like ($output, qr/ID\s+1\n/, 'log ID'); -like ($output, qr/Description\s+This is a test\n/, 'log ID'); -like ($output, qr/Status\s+Completed\n/, 'log Completed'); -like ($output, qr/UUID\s+[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\n/, 'log UUID'); +my $output = qx{../src/task rc:log.rc completed}; +like ($output, qr/This is a test/, 'log description'); # Cleanup. unlink 'pending.data';