Unit Tests

- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
Paul Beckingham 2012-07-03 15:43:19 -04:00
parent 75822eed47
commit da575c4043
185 changed files with 1591 additions and 1591 deletions

View file

@ -41,16 +41,16 @@ if (open my $fh, '>', 'summary.rc')
# Add three tasks. Do 1, delete 1, leave 1 pending. Summary should depict a
# 50% completion.
qx{../src/task rc:summary.rc add project:A one};
qx{../src/task rc:summary.rc add project:A two};
qx{../src/task rc:summary.rc add project:A three};
qx{../src/task rc:summary.rc 1 do};
qx{../src/task rc:summary.rc 2 delete};
my $output = qx{../src/task rc:summary.rc summary};
qx{../src/task rc:summary.rc add project:A one 2>&1};
qx{../src/task rc:summary.rc add project:A two 2>&1};
qx{../src/task rc:summary.rc add project:A three 2>&1};
qx{../src/task rc:summary.rc 1 do 2>&1};
qx{../src/task rc:summary.rc 2 delete 2>&1};
my $output = qx{../src/task rc:summary.rc summary 2>&1};
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% before report');
qx{../src/task rc:summary.rc list};
$output = qx{../src/task rc:summary.rc summary};
qx{../src/task rc:summary.rc list 2>&1};
$output = qx{../src/task rc:summary.rc summary 2>&1};
like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% after report');
# Cleanup.