Unit Tests

- Fixed more unit tests that were out of synch with the latest
  functionality, text messages or rendering.
This commit is contained in:
Paul Beckingham
2011-08-24 00:47:44 -04:00
parent 6f38e10cab
commit 02df3853f7
4 changed files with 5 additions and 7 deletions

View File

@@ -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';