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