mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Removed obsolete tests.
This commit is contained in:
parent
1cf79ffda7
commit
50a12d3598
1 changed files with 15 additions and 13 deletions
|
@ -27,28 +27,30 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 3;
|
use Test::More tests => 1;
|
||||||
|
|
||||||
|
# Ensure environment has no influence.
|
||||||
|
delete $ENV{'TASKDATA'};
|
||||||
|
delete $ENV{'TASKRC'};
|
||||||
|
|
||||||
|
use File::Basename;
|
||||||
|
my $ut = basename ($0);
|
||||||
|
my $rc = $ut . '.rc';
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'minus.rc')
|
if (open my $fh, '>', $rc)
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'minus.rc', 'Created minus.rc');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bug 982: Missing words when adding a description with NUMBER-SOMETHING
|
# Bug 982: Missing words when adding a description with NUMBER-SOMETHING
|
||||||
|
|
||||||
qx{../src/task rc:minus.rc add 1-test 1+tag 2>&1};
|
qx{../src/task rc:$rc add 1-test 1+tag 2>&1};
|
||||||
my $output = qx{../src/task rc:minus.rc 1 info 2>&1};
|
my $output = qx{../src/task rc:$rc 1 info 2>&1};
|
||||||
like ($output, qr/^Description 1-test 1\+tag$/ms, 'Description contains plus and minus signs');
|
like ($output, qr/^Description 1-test 1\+tag$/ms, 'Description contains plus and minus signs');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data minus.rc);
|
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
|
||||||
ok (! -r 'pending.data' &&
|
|
||||||
! -r 'completed.data' &&
|
|
||||||
! -r 'undo.data' &&
|
|
||||||
! -r 'backlog.data' &&
|
|
||||||
! -r 'minus.rc', 'Cleanup');
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue