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

@ -40,24 +40,24 @@ if (open my $fh, '>', 'args.rc')
}
# Test the -- argument.
qx{../src/task rc:args.rc add project:p pri:H +tag foo};
my $output = qx{../src/task rc:args.rc info 1};
qx{../src/task rc:args.rc add project:p pri:H +tag foo 2>&1};
my $output = qx{../src/task rc:args.rc info 1 2>&1};
like ($output, qr/Description\s+foo\n/ms, 'task add project:p pri:H +tag foo');
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo};
$output = qx{../src/task rc:args.rc info 1};
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo 2>&1};
$output = qx{../src/task rc:args.rc info 1 2>&1};
like ($output, qr/Description\s+foo\n/ms, 'task 1 modify project:p pri:H +tag -- foo');
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo};
$output = qx{../src/task rc:args.rc info 1};
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo 2>&1};
$output = qx{../src/task rc:args.rc info 1 2>&1};
like ($output, qr/Description\s+\+tag\sfoo\n/ms, 'task 1 modify project:p pri:H -- +tag foo');
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo};
$output = qx{../src/task rc:args.rc info 1};
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo 2>&1};
$output = qx{../src/task rc:args.rc info 1 2>&1};
like ($output, qr/Description\s+pri:H\s\+tag\sfoo\n/ms, 'task 1 modify project:p -- pri:H +tag foo');
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo};
$output = qx{../src/task rc:args.rc info 1};
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo 2>&1};
$output = qx{../src/task rc:args.rc info 1 2>&1};
like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo');
# Cleanup.