Unit Tests
- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
@@ -42,12 +42,12 @@ if (open my $fh, '>', 'shell.rc')
|
||||
}
|
||||
|
||||
# Test the prompt.
|
||||
my $output = qx{echo "quit" | ../src/task rc:shell.rc shell};
|
||||
my $output = qx{echo "quit" | ../src/task rc:shell.rc shell 2>&1};
|
||||
like ($output, qr/testprompt>/, 'custom prompt is being used');
|
||||
|
||||
# Test a simple add, then info.
|
||||
qx{echo "add foo" | ../src/task rc:shell.rc shell};
|
||||
$output = qx{echo "1 info" | ../src/task rc:shell.rc shell};
|
||||
qx{echo "add foo" | ../src/task rc:shell.rc shell 2>&1};
|
||||
$output = qx{echo "1 info" | ../src/task rc:shell.rc shell 2>&1};
|
||||
like ($output, qr/Description\s+foo/, 'add/info working');
|
||||
|
||||
unlink 'shell.rc';
|
||||
|
||||
Reference in New Issue
Block a user