Unit Tests
- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
@@ -46,12 +46,12 @@ if (open my $fh, '>', 'color.rc')
|
||||
}
|
||||
|
||||
# Test the add command.
|
||||
qx{../src/task rc:color.rc add nothing};
|
||||
qx{../src/task rc:color.rc add red};
|
||||
qx{../src/task rc:color.rc add green};
|
||||
qx{../src/task rc:color.rc add -- annotation};
|
||||
qx{../src/task rc:color.rc 4 annotate yellow};
|
||||
my $output = qx{../src/task rc:color.rc list};
|
||||
qx{../src/task rc:color.rc add nothing 2>&1};
|
||||
qx{../src/task rc:color.rc add red 2>&1};
|
||||
qx{../src/task rc:color.rc add green 2>&1};
|
||||
qx{../src/task rc:color.rc add -- annotation 2>&1};
|
||||
qx{../src/task rc:color.rc 4 annotate yellow 2>&1};
|
||||
my $output = qx{../src/task rc:color.rc list 2>&1};
|
||||
|
||||
like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none');
|
||||
like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.keyword.red');
|
||||
|
||||
Reference in New Issue
Block a user