- The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
This commit is contained in:
Paul Beckingham
2013-03-30 17:42:45 -04:00
parent 0fd3ddbe57
commit 03cb5af7be
23 changed files with 50 additions and 31 deletions

View File

@@ -40,7 +40,8 @@ if (open my $fh, '>', 'annotate.rc')
"report.rrr.description=rrr\n",
"report.rrr.columns=id,description\n",
"report.rrr.sort=id+\n",
"color=off\n";
"color=off\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'annotate.rc', 'Created annotate.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",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}

View File

@@ -34,7 +34,7 @@ use Test::More tests => 4;
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n",
"dateformat=m/d/Y\n",
"dateformat.info=m/d/Y\n",
"confirmation=no\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');

View File

@@ -47,7 +47,7 @@ qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task 2>&1};
# Result: Immediately delete the created task
my $output = qx{../src/task rc:bug.rc waiting 2>&1};
like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.');
like ($output, qr/Jan 01 2020/ms, 'a b D Y dateformat correctly parsed.');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data bug.rc);

View File

@@ -33,7 +33,8 @@ use Test::More tests => 13;
# Create the rc file.
if (open my $fh, '>', 'annual.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'annual.rc', 'Created annual.rc');
}

View File

@@ -36,7 +36,8 @@ if (open my $fh, '>', 'before.rc')
{
print $fh "data.location=.\n",
"confirmation=no\n",
"dateformat=m/d/Y\n";
"dateformat=m/d/Y\n",
"dateformat.info=m/d/Y\n";
close $fh;
ok (-r 'before.rc', 'Created before.rc');
}

View File

@@ -34,7 +34,8 @@ use Test::More tests => 5;
if (open my $fh, '>', 'range.rc')
{
print $fh "data.location=.\n",
"confirmation=no\n";
"confirmation=no\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'range.rc', 'Created range.rc');
}

View File

@@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.due=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View File

@@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.due.today=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View File

@@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.overdue=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View File

@@ -34,7 +34,7 @@ use Test::More tests => 4;
if (open my $fh, '>', 'iso.rc')
{
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
"dateformat.info=m/d/Y\n";
close $fh;
ok (-r 'iso.rc', 'Created iso.rc');
}

View File

@@ -37,7 +37,8 @@ if (open my $fh, '>', 'default.rc')
"default.command=list\n",
"default.project=PROJECT\n",
"default.priority=M\n",
"default.due=eom\n";
"default.due=eom\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'default.rc', 'Created default.rc');
}

View File

@@ -39,7 +39,8 @@ if (open my $fh, '>', 'denotate.rc')
"confirmation=off\n",
"report.rrr.description=rrr\n",
"report.rrr.columns=id,description\n",
"report.rrr.sort=id+\n";
"report.rrr.sort=id+\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'denotate.rc', 'Created denotate.rc');
}

View File

@@ -33,7 +33,8 @@ use Test::More tests => 13;
# Create the rc file.
if (open my $fh, '>', 'import.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'import.rc', 'Created import.rc');
}

View File

@@ -33,7 +33,8 @@ use Test::More tests => 16;
# Create the rc file.
if (open my $fh, '>', 'import.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'import.rc', 'Created import.rc');
}

View File

@@ -36,7 +36,8 @@ if (open my $fh, '>', 'roundtrip.rc')
print $fh "data.location=.\n",
"verbose=off\n",
"confirmation=no\n",
"defaultwidth=100\n";
"defaultwidth=100\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'roundtrip.rc', 'Created roundtrip.rc');
}

View File

@@ -34,7 +34,8 @@ use Test::More tests => 26;
if (open my $fh, '>', 'seq.rc')
{
print $fh "data.location=.\n",
"confirmation=off\n";
"confirmation=off\n",
"dateformat.annotation=m/d/Y\n";
close $fh;
ok (-r 'seq.rc', 'Created seq.rc');
}

View File

@@ -40,7 +40,8 @@ if (open my $fh, '>', 'uda.rc')
"report.uda.description=UDA Test\n",
"report.uda.columns=id,extra,description\n",
"report.uda.sort=extra,description\n",
"report.uda.labels=ID,Extra,Description\n";
"report.uda.labels=ID,Extra,Description\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'uda.rc', 'Created uda.rc');
}

View File

@@ -33,7 +33,8 @@ use Test::More tests => 26;
# Create the rc file.
if (open my $fh, '>', 'uuid.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'uuid.rc', 'Created uuid.rc');
}