Unit Tests

- Added rc.confirmation=off to unit tests to bypass the new, stringent
  confirmation rules.
This commit is contained in:
Paul Beckingham 2011-10-14 03:04:16 -04:00
parent 75571a47de
commit f04304d24b
8 changed files with 17 additions and 9 deletions

View file

@ -33,7 +33,8 @@ use Test::More tests => 4;
# Create the rc file.
if (open my $fh, '>', 'append.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r 'append.rc', 'Created append.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 8;
# Create the rc file.
if (open my $fh, '>', '425.rc')
{
print $fh "data.location=.";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r '425.rc', 'Created 425.rc');

View file

@ -33,7 +33,8 @@ use Test::More tests => 8;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}
@ -43,7 +44,7 @@ if (open my $fh, '>', 'bug.rc')
# Add a task that is waiting
qx{../src/task rc:bug.rc add One wait:tomorrow};
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.
unlink 'pending.data';

View file

@ -36,7 +36,8 @@ if (open my $fh, '>', 'bug.rc')
print $fh "data.location=.\n",
"dateformat=SNHDMY\n",
"report.foo.columns=entry,start,end,description\n",
"report.foo.dateformat=SNHDMY\n";
"report.foo.dateformat=SNHDMY\n",
"confirmation=off\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 11;
# Create the rc file.
if (open my $fh, '>', '440.rc')
{
print $fh "data.location=.";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r '440.rc', 'Created 440.rc');

View file

@ -34,7 +34,8 @@ use Test::More tests => 37;
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n",
"defaultwidth=0\n";
"defaultwidth=0\n",
"confirmation=off\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');

View file

@ -33,7 +33,8 @@ use Test::More tests => 8;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');

View file

@ -33,7 +33,8 @@ use Test::More tests => 4;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"confirmation=off\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}