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,19 +40,19 @@ if (open my $fh, '>', 'op.rc')
}
# Setup: Add a task
qx{../src/task rc:op.rc add one priority:H};
qx{../src/task rc:op.rc add two priority:M};
qx{../src/task rc:op.rc add three priority:L};
qx{../src/task rc:op.rc add four };
qx{../src/task rc:op.rc add one priority:H 2>&1};
qx{../src/task rc:op.rc add two priority:M 2>&1};
qx{../src/task rc:op.rc add three priority:L 2>&1};
qx{../src/task rc:op.rc add four 2>&1};
# Test the '>=' operator.
my $output = qx{../src/task rc:op.rc ls 'priority >= M'};
my $output = qx{../src/task rc:op.rc ls 'priority >= M' 2>&1};
like ($output, qr/one/, 'ls priority >= M --> one');
like ($output, qr/two/, 'ls priority >= M --> two');
unlike ($output, qr/three/, 'ls priority >= M --> !three');
unlike ($output, qr/four/, 'ls priority >= M --> !four');
$output = qx{../src/task rc:op.rc ls 'description >= t'};
$output = qx{../src/task rc:op.rc ls 'description >= t' 2>&1};
unlike ($output, qr/one/, 'ls description >= t --> !one');
like ($output, qr/two/, 'ls description >= t --> two');
like ($output, qr/three/, 'ls description >= t --> three');