mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Corrected several tests with respect to the new custom report columns and sort fields.
This commit is contained in:
parent
868a7a2249
commit
5da435e70d
3 changed files with 40 additions and 38 deletions
|
@ -62,8 +62,8 @@ my %tests =
|
|||
'priority+' => 'zero.+three.+two.+(?:one.+four|four.+one)',
|
||||
'project-' => '(?:three.+four|four.+three).+two.+one.+zero',
|
||||
'project+' => 'zero.+one.+two.+(?:three.+four|four.+three)',
|
||||
'active-' => '(?:one.+three|three.+one).+(?:zero.+two.+four|zero.+four.+two|two.+zero.+four|two.+four.+zero|four.+zero.+two|four.+two.+zero)',
|
||||
'active+' => '(?:zero.+two.+four|zero.+four.+two|two.+zero.+four|two.+four.+zero|four.+zero.+two|four.+two.+zero).+(?:one.+three|three.+one)',
|
||||
'start-' => '(?:one.+three|three.+one).+(?:zero.+two.+four|zero.+four.+two|two.+zero.+four|two.+four.+zero|four.+zero.+two|four.+two.+zero)',
|
||||
'start+' => '(?:zero.+two.+four|zero.+four.+two|two.+zero.+four|two.+four.+zero|four.+zero.+two|four.+two.+zero).+(?:one.+three|three.+one)',
|
||||
'due-' => 'three.+(?:two.+four|four.+two).+one.+zero',
|
||||
'due+' => 'one.+(?:two.+four|four.+two).+three.+zero',
|
||||
'description-' => 'zero.+two.+three.+one.+four',
|
||||
|
@ -75,10 +75,10 @@ my %tests =
|
|||
'priority+,project-' => 'zero.+three.+two.+four.+one',
|
||||
'priority+,project+' => 'zero.+three.+two.+one.+four',
|
||||
|
||||
'priority-,active-' => 'one.+four.+two.+three.+zero',
|
||||
'priority-,active+' => 'four.+one.+two.+three.+zero',
|
||||
'priority+,active-' => 'zero.+three.+two.+one.+four',
|
||||
'priority+,active+' => 'zero.+three.+two.+four.+one',
|
||||
'priority-,start-' => 'one.+four.+two.+three.+zero',
|
||||
'priority-,start+' => 'four.+one.+two.+three.+zero',
|
||||
'priority+,start-' => 'zero.+three.+two.+one.+four',
|
||||
'priority+,start+' => 'zero.+three.+two.+four.+one',
|
||||
|
||||
'priority-,due-' => 'four.+one.+two.+three.+zero',
|
||||
'priority-,due+' => 'one.+four.+two.+three.+zero',
|
||||
|
@ -95,10 +95,10 @@ my %tests =
|
|||
'project+,priority-' => 'zero.+one.+two.+four.+three',
|
||||
'project+,priority+' => 'zero.+one.+two.+three.+four',
|
||||
|
||||
'project-,active-' => 'three.+four.+two.+one.+zero',
|
||||
'project-,active+' => 'four.+three.+two.+one.+zero',
|
||||
'project+,active-' => 'zero.+one.+two.+three.+four',
|
||||
'project+,active+' => 'zero.+one.+two.+four.+three',
|
||||
'project-,start-' => 'three.+four.+two.+one.+zero',
|
||||
'project-,start+' => 'four.+three.+two.+one.+zero',
|
||||
'project+,start-' => 'zero.+one.+two.+three.+four',
|
||||
'project+,start+' => 'zero.+one.+two.+four.+three',
|
||||
|
||||
'project-,due-' => 'three.+four.+two.+one.+zero',
|
||||
'project-,due+' => 'four.+three.+two.+one.+zero',
|
||||
|
@ -110,25 +110,25 @@ my %tests =
|
|||
'project+,description-' => 'zero.+one.+two.+three.+four',
|
||||
'project+,description+' => 'zero.+one.+two.+four.+three',
|
||||
|
||||
'active-,priority-' => 'one.+three.+four.+two.+zero',
|
||||
'active-,priority+' => 'three.+one.+zero.+two.+four',
|
||||
'active+,priority-' => 'four.+two.+zero.+one.+three',
|
||||
'active+,priority+' => 'zero.+two.+four.+three.+one',
|
||||
'start-,priority-' => 'one.+three.+four.+two.+zero',
|
||||
'start-,priority+' => 'three.+one.+zero.+two.+four',
|
||||
'start+,priority-' => 'four.+two.+zero.+one.+three',
|
||||
'start+,priority+' => 'zero.+two.+four.+three.+one',
|
||||
|
||||
'active-,project-' => 'three.+one.+four.+two.+zero',
|
||||
'active-,project+' => 'one.+three.+zero.+two.+four',
|
||||
'active+,project-' => 'four.+two.+zero.+three.+one',
|
||||
'active+,project+' => 'zero.+two.+four.+one.+three',
|
||||
'start-,project-' => 'three.+one.+four.+two.+zero',
|
||||
'start-,project+' => 'one.+three.+zero.+two.+four',
|
||||
'start+,project-' => 'four.+two.+zero.+three.+one',
|
||||
'start+,project+' => 'zero.+two.+four.+one.+three',
|
||||
|
||||
'active-,due-' => 'three.+one.+(?:four.+two|two.+four).+zero',
|
||||
'active-,due+' => 'one.+three.+(?:four.+two|two.+four).+zero',
|
||||
'active+,due-' => '(?:four.+two|two.+four).+zero.+three.+one',
|
||||
'active+,due+' => '(?:four.+two|two.+four).+zero.+one.+three',
|
||||
'start-,due-' => 'three.+one.+(?:four.+two|two.+four).+zero',
|
||||
'start-,due+' => 'one.+three.+(?:four.+two|two.+four).+zero',
|
||||
'start+,due-' => '(?:four.+two|two.+four).+zero.+three.+one',
|
||||
'start+,due+' => '(?:four.+two|two.+four).+zero.+one.+three',
|
||||
|
||||
'active-,description-' => 'three.+one.+zero.+two.+four',
|
||||
'active-,description+' => 'one.+three.+four.+two.+zero',
|
||||
'active+,description-' => 'zero.+two.+four.+three.+one',
|
||||
'active+,description+' => 'four.+two.+zero.+one.+three',
|
||||
'start-,description-' => 'three.+one.+zero.+two.+four',
|
||||
'start-,description+' => 'one.+three.+four.+two.+zero',
|
||||
'start+,description-' => 'zero.+two.+four.+three.+one',
|
||||
'start+,description+' => 'four.+two.+zero.+one.+three',
|
||||
|
||||
'due-,priority-' => 'three.+four.+two.+one.+zero',
|
||||
'due-,priority+' => 'three.+two.+four.+one.+zero',
|
||||
|
@ -140,10 +140,10 @@ my %tests =
|
|||
'due+,project-' => 'one.+four.+two.+three.+zero',
|
||||
'due+,project+' => 'one.+two.+four.+three.+zero',
|
||||
|
||||
'due-,active-' => 'three.+(?:four.+two|two.+four).+one.+zero',
|
||||
'due-,active+' => 'three.+(?:four.+two|two.+four).+one.+zero',
|
||||
'due+,active-' => 'one.+(?:four.+two|two.+four).+three.+zero',
|
||||
'due+,active+' => 'one.+(?:four.+two|two.+four).+three.+zero',
|
||||
'due-,start-' => 'three.+(?:four.+two|two.+four).+one.+zero',
|
||||
'due-,start+' => 'three.+(?:four.+two|two.+four).+one.+zero',
|
||||
'due+,start-' => 'one.+(?:four.+two|two.+four).+three.+zero',
|
||||
'due+,start+' => 'one.+(?:four.+two|two.+four).+three.+zero',
|
||||
|
||||
'due-,description-' => 'three.+two.+four.+one.+zero',
|
||||
'due-,description+' => 'three.+four.+two.+one.+zero',
|
||||
|
@ -160,10 +160,10 @@ my %tests =
|
|||
'description+,project-' => 'four.+one.+three.+two.+zero',
|
||||
'description+,project+' => 'four.+one.+three.+two.+zero',
|
||||
|
||||
'description-,active-' => 'zero.+two.+three.+one.+four',
|
||||
'description-,active+' => 'zero.+two.+three.+one.+four',
|
||||
'description+,active-' => 'four.+one.+three.+two.+zero',
|
||||
'description+,active+' => 'four.+one.+three.+two.+zero',
|
||||
'description-,start-' => 'zero.+two.+three.+one.+four',
|
||||
'description-,start+' => 'zero.+two.+three.+one.+four',
|
||||
'description+,start-' => 'four.+one.+three.+two.+zero',
|
||||
'description+,start+' => 'four.+one.+three.+two.+zero',
|
||||
|
||||
'description-,due-' => 'zero.+two.+three.+one.+four',
|
||||
'description-,due+' => 'zero.+two.+three.+one.+four',
|
||||
|
@ -171,8 +171,8 @@ my %tests =
|
|||
'description+,due+' => 'four.+one.+three.+two.+zero',
|
||||
|
||||
# Four sort columns.
|
||||
'active+,project+,due+,priority+' => 'zero.+two.+four.+one.+three',
|
||||
'project+,due+,priority+,active+' => 'zero.+one.+two.+four.+three',
|
||||
'start+,project+,due+,priority+' => 'zero.+two.+four.+one.+three',
|
||||
'project+,due+,priority+,start+' => 'zero.+one.+two.+four.+three',
|
||||
);
|
||||
|
||||
for my $sort (sort keys %tests)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue