Unit Tests
- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
20
test/args.t
20
test/args.t
@@ -40,24 +40,24 @@ if (open my $fh, '>', 'args.rc')
|
||||
}
|
||||
|
||||
# Test the -- argument.
|
||||
qx{../src/task rc:args.rc add project:p pri:H +tag foo};
|
||||
my $output = qx{../src/task rc:args.rc info 1};
|
||||
qx{../src/task rc:args.rc add project:p pri:H +tag foo 2>&1};
|
||||
my $output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||
like ($output, qr/Description\s+foo\n/ms, 'task add project:p pri:H +tag foo');
|
||||
|
||||
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo};
|
||||
$output = qx{../src/task rc:args.rc info 1};
|
||||
qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo 2>&1};
|
||||
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||
like ($output, qr/Description\s+foo\n/ms, 'task 1 modify project:p pri:H +tag -- foo');
|
||||
|
||||
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo};
|
||||
$output = qx{../src/task rc:args.rc info 1};
|
||||
qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo 2>&1};
|
||||
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||
like ($output, qr/Description\s+\+tag\sfoo\n/ms, 'task 1 modify project:p pri:H -- +tag foo');
|
||||
|
||||
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo};
|
||||
$output = qx{../src/task rc:args.rc info 1};
|
||||
qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo 2>&1};
|
||||
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||
like ($output, qr/Description\s+pri:H\s\+tag\sfoo\n/ms, 'task 1 modify project:p -- pri:H +tag foo');
|
||||
|
||||
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo};
|
||||
$output = qx{../src/task rc:args.rc info 1};
|
||||
qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo 2>&1};
|
||||
$output = qx{../src/task rc:args.rc info 1 2>&1};
|
||||
like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo');
|
||||
|
||||
# Cleanup.
|
||||
|
||||
Reference in New Issue
Block a user