From 02df3853f75297e084c388ec899e6586371580c0 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 24 Aug 2011 00:47:44 -0400 Subject: [PATCH] Unit Tests - Fixed more unit tests that were out of synch with the latest functionality, text messages or rendering. --- test/bug.440.t | 2 +- test/bug.concat.t | 2 +- test/custom.priority_long.t | 6 ++---- test/wait.t | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/bug.440.t b/test/bug.440.t index d3f4778cd..8b703b6f9 100755 --- a/test/bug.440.t +++ b/test/bug.440.t @@ -46,7 +46,7 @@ if (open my $fh, '>', '440.rc') qx{../src/task rc:440.rc add Foo}; qx{../src/task rc:440.rc add Foo}; -qx{../src/task rc:440.rc 1 /Foo/Bar/ append Appendtext}; +qx{../src/task rc:440.rc 1 append /Foo/Bar/ Appendtext}; qx{../src/task rc:440.rc 2 append Appendtext /Foo/Bar/}; my $output1 = qx{../src/task rc:440.rc 1 ls}; diff --git a/test/bug.concat.t b/test/bug.concat.t index 5c3daa911..95083725e 100755 --- a/test/bug.concat.t +++ b/test/bug.concat.t @@ -49,7 +49,7 @@ if (open my $fh, '>', 'bug_concat.rc') qx{../src/task rc:bug_concat.rc add This is the original text}; my $output = qx{../src/task rc:bug_concat.rc info 1}; -like ($output, qr/Description\s+This is the original text\n/, 'original correct'); +like ($output, qr/Description\s+This is the original text/, 'original correct'); qx{../src/task rc:bug_concat.rc 1 modify This is the modified text}; $output = qx{../src/task rc:bug_concat.rc info 1}; diff --git a/test/custom.priority_long.t b/test/custom.priority_long.t index 053eb92a0..a3fc2b15b 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 => 12; +use Test::More tests => 11; # Create the rc file. if (open my $fh, '>', 'pri.rc') @@ -36,7 +36,7 @@ if (open my $fh, '>', 'pri.rc') print $fh "data.location=.\n", "report.foo.description=DESC\n", "report.foo.columns=id,priority.long\n", - "report.foo.labels=ID,P\n", + "report.foo.labels=ID,Pri\n", "report.foo.sort=id+\n"; close $fh; ok (-r 'pri.rc', 'Created pri.rc'); @@ -46,14 +46,12 @@ if (open my $fh, '>', 'pri.rc') qx{../src/task rc:pri.rc add one pri:H}; qx{../src/task rc:pri.rc add two pri:M}; qx{../src/task rc:pri.rc add three pri:L}; -qx{../src/task rc:pri.rc add four pri:}; my $output = qx{../src/task rc:pri.rc foo 2>&1}; like ($output, qr/ID.+Pri/, 'priority.long indicator heading'); like ($output, qr/1\s+High/, 'priority.long High'); like ($output, qr/2\s+Medium/, 'priority.long Medium'); like ($output, qr/3\s+Low/, 'priority.long Low'); -like ($output, qr/4\s*\n/, 'priority.long None'); # Cleanup. unlink 'pending.data'; diff --git a/test/wait.t b/test/wait.t index 3c2eb0547..74a37f4f9 100755 --- a/test/wait.t +++ b/test/wait.t @@ -75,7 +75,7 @@ $output = qx{../src/task rc:wait.rc all status:waiting wait:tomorrow}; like ($output, qr/tomorrow/ms, 'waiting task visible when specifically queried'); $output = qx{../src/task rc:wait.rc add Complain due:today wait:tomorrow}; -like ($output, qr/A 'wait' date must be before a 'due' date\./, 'error on wait after due'); +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';