mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Bug #1091
- Fixed bug #1091, allowing filters to use 'urgency.over:4.5'.
This commit is contained in:
parent
76468f3ddd
commit
dd1f154376
7 changed files with 134 additions and 5 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 22;
|
||||
use Test::More tests => 26;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -76,6 +76,12 @@ like ($output, qr/two/, 'ls description > t --> two');
|
|||
like ($output, qr/three/, 'ls description > t --> three');
|
||||
unlike ($output, qr/four/, 'ls description > t --> !four');
|
||||
|
||||
$output = qx{../src/task rc:op.rc 'urgency > 10.0' ls 2>&1};
|
||||
like ($output, qr/one/, 'ls urgency > 10 --> one');
|
||||
like ($output, qr/two/, 'ls urgency > 10 --> two');
|
||||
unlike ($output, qr/three/, 'ls urgency > 10 --> !three');
|
||||
unlike ($output, qr/four/, 'ls urgency > 10 --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 10;
|
||||
use Test::More tests => 14;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -58,6 +58,12 @@ like ($output, qr/two/, 'ls description >= t --> two');
|
|||
like ($output, qr/three/, 'ls description >= t --> three');
|
||||
unlike ($output, qr/four/, 'ls description >= t --> !four');
|
||||
|
||||
$output = qx{../src/task rc:op.rc 'urgency >= 2.0' ls 2>&1};
|
||||
like ($output, qr/one/, 'ls urgency >= 2.0 --> one');
|
||||
like ($output, qr/two/, 'ls urgency >= 2.0 --> two');
|
||||
unlike ($output, qr/three/, 'ls urgency >= 2.0 --> !three');
|
||||
unlike ($output, qr/four/, 'ls urgency >= 2.0 --> !four');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 22;
|
||||
use Test::More tests => 26;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -76,6 +76,12 @@ unlike ($output, qr/two/, 'ls description < t --> !two');
|
|||
unlike ($output, qr/three/, 'ls description < t --> !three');
|
||||
like ($output, qr/four/, 'ls description < t --> four');
|
||||
|
||||
$output = qx{../src/task rc:op.rc 'urgency < 10.0' ls 2>&1};
|
||||
unlike ($output, qr/one/, 'ls description < 10 --> !one');
|
||||
unlike ($output, qr/two/, 'ls description < 10 --> !two');
|
||||
like ($output, qr/three/, 'ls description < 10 --> three');
|
||||
like ($output, qr/four/, 'ls description < 10 --> four');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 10;
|
||||
use Test::More tests => 14;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'op.rc')
|
||||
|
@ -58,6 +58,12 @@ unlike ($output, qr/two/, 'ls description <= t --> !two');
|
|||
unlike ($output, qr/three/, 'ls description <= t --> !three');
|
||||
like ($output, qr/four/, 'ls description <= t --> four');
|
||||
|
||||
$output = qx{../src/task rc:op.rc 'urgency <= 2.0' ls 2>&1};
|
||||
unlike ($output, qr/one/, 'ls urgency <= 2.0 --> !one');
|
||||
unlike ($output, qr/two/, 'ls urgency <= 2.0 --> !two');
|
||||
like ($output, qr/three/, 'ls urgency <= 2.0 --> three');
|
||||
like ($output, qr/four/, 'ls urgency <= 2.0 --> four');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key op.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue