mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 14:36:44 +02:00
Unit Tests
- Added proper handling for when no command or filter is specified, and no rc.default.command exists. - Improved wording on above error message. - Fixed typo in previous commit (managed to check in code before the build completed, and ultimately failed). - Now reports errors that occur during initialization at the same level of verbosity as during command execution.
This commit is contained in:
parent
8aeef40b80
commit
7fbe124fe0
6 changed files with 26 additions and 12 deletions
|
@ -44,7 +44,7 @@ my $version = slurp ('../../configure.ac');
|
|||
|
||||
# Test the usage command.
|
||||
my $output = qx{../src/task rc:basic.rc};
|
||||
like ($output, qr/You must specify a command, or a task ID to modify/m, 'missing command and ID');
|
||||
like ($output, qr/You must specify a command or a task to modify./m, 'missing command and ID');
|
||||
|
||||
# Test the version command.
|
||||
$output = qx{../src/task rc:basic.rc version};
|
||||
|
|
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'sorting.rc')
|
|||
}
|
||||
|
||||
# Test assorted sort orders.
|
||||
|
||||
qx{../src/task rc:sorting.rc add zero};
|
||||
qx{../src/task rc:sorting.rc add priority:H project:A due:yesterday one};
|
||||
qx{../src/task rc:sorting.rc add priority:M project:B due:today two};
|
||||
|
@ -49,12 +48,6 @@ qx{../src/task rc:sorting.rc add priority:H project:C due:today four};
|
|||
qx{../src/task rc:sorting.rc start 2};
|
||||
qx{../src/task rc:sorting.rc start 4};
|
||||
|
||||
# pri:H pro:C due:today four
|
||||
# pri:H pro:A * due:yesterday one
|
||||
# pri:M pro:B due:today two
|
||||
# pri:L pro:C * due:tomorrow three
|
||||
# zero
|
||||
|
||||
my %tests =
|
||||
(
|
||||
# Single sort column.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue