mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 14:36:44 +02:00
Unit Tests
- Updated a test to use a command of length >= rc.abbreviation.minimum. - Removed useless setup/teardown tests.
This commit is contained in:
parent
37acb90579
commit
a86408c5a3
1 changed files with 3 additions and 10 deletions
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 21;
|
use Test::More tests => 19;
|
||||||
|
|
||||||
# Ensure environment has no influence.
|
# Ensure environment has no influence.
|
||||||
delete $ENV{'TASKDATA'};
|
delete $ENV{'TASKDATA'};
|
||||||
|
@ -39,7 +39,6 @@ if (open my $fh, '>', 'abbrev.rc')
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"abbreviation.minimum=1\n";
|
"abbreviation.minimum=1\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'abbrev.rc', 'Created abbrev.rc');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the priority attribute abbrevations.
|
# Test the priority attribute abbrevations.
|
||||||
|
@ -87,18 +86,12 @@ $output = qx{../src/task rc:abbrev.rc ver 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
like ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc ve 2>&1};
|
$output = qx{../src/task rc:abbrev.rc ve 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
unlike ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
$output = qx{../src/task rc:abbrev.rc v 2>&1};
|
$output = qx{../src/task rc:abbrev.rc v 2>&1};
|
||||||
like ($output, qr/MIT\s+license/, 'version');
|
unlike ($output, qr/MIT\s+license/, 'version');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data abbrev.rc);
|
unlink qw(pending.data completed.data undo.data backlog.data abbrev.rc);
|
||||||
ok (! -r 'pending.data' &&
|
|
||||||
! -r 'completed.data' &&
|
|
||||||
! -r 'undo.data' &&
|
|
||||||
! -r 'backlog.data' &&
|
|
||||||
! -r 'abbrev.rc', 'Cleanup');
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue