mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 14:36:44 +02:00
Unit Tests
- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
parent
75822eed47
commit
da575c4043
185 changed files with 1591 additions and 1591 deletions
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue