mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Unit Tests
- Added rc.confirmation=off to unit tests to bypass the new, stringent confirmation rules.
This commit is contained in:
parent
75571a47de
commit
f04304d24b
8 changed files with 17 additions and 9 deletions
|
@ -33,7 +33,8 @@ use Test::More tests => 4;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'append.rc')
|
if (open my $fh, '>', 'append.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'append.rc', 'Created append.rc');
|
ok (-r 'append.rc', 'Created append.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 8;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', '425.rc')
|
if (open my $fh, '>', '425.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
|
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r '425.rc', 'Created 425.rc');
|
ok (-r '425.rc', 'Created 425.rc');
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 8;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
}
|
}
|
||||||
|
@ -43,7 +44,7 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
# Add a task that is waiting
|
# Add a task that is waiting
|
||||||
qx{../src/task rc:bug.rc add One wait:tomorrow};
|
qx{../src/task rc:bug.rc add One wait:tomorrow};
|
||||||
my $output = qx{../src/task rc:bug.rc 1 done};
|
my $output = qx{../src/task rc:bug.rc 1 done};
|
||||||
like ($output, qr/Marked 1 task as done\./, 'Waiting task marked completed');
|
like ($output, qr/Completed 1 task\./, 'Waiting task marked completed');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
|
|
|
@ -36,7 +36,8 @@ if (open my $fh, '>', 'bug.rc')
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"dateformat=SNHDMY\n",
|
"dateformat=SNHDMY\n",
|
||||||
"report.foo.columns=entry,start,end,description\n",
|
"report.foo.columns=entry,start,end,description\n",
|
||||||
"report.foo.dateformat=SNHDMY\n";
|
"report.foo.dateformat=SNHDMY\n",
|
||||||
|
"confirmation=off\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 11;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', '440.rc')
|
if (open my $fh, '>', '440.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
|
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r '440.rc', 'Created 440.rc');
|
ok (-r '440.rc', 'Created 440.rc');
|
||||||
|
|
|
@ -34,7 +34,8 @@ use Test::More tests => 37;
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"defaultwidth=0\n";
|
"defaultwidth=0\n",
|
||||||
|
"confirmation=off\n";
|
||||||
|
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 8;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
|
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 4;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"confirmation=off\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue