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