Test: Extended history tests to cover ghistory

This commit is contained in:
Paul Beckingham 2015-07-18 13:54:14 -04:00
parent 09fb6524cc
commit 428209e128
2 changed files with 14 additions and 6 deletions

View file

@ -27,7 +27,7 @@
use strict;
use warnings;
use Test::More tests => 3;
use Test::More tests => 5;
# Ensure environment has no influence.
delete $ENV{'TASKDATA'};
@ -73,6 +73,10 @@ like ($output, qr/7\s+1\s+0\s+6/, 'history.annual - last year');
like ($output, qr/2\s+3\s+3\s+-4/, 'history.annual - this year');
like ($output, qr/4\s+2\s+1\s+1/, 'history.annual - average');
$output = qx{../src/task rc:$rc ghistory.annual rc._forcecolor:on 2>&1};
like ($output, qr/7.+1.+$/m, 'ghistory.annual - last year');
like ($output, qr/2.+3.+3.+$/m, 'ghistory.annual - this year');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
exit 0;

View file

@ -27,7 +27,7 @@
use strict;
use warnings;
use Test::More tests => 3;
use Test::More tests => 5;
# Ensure environment has no influence.
delete $ENV{'TASKDATA'};
@ -73,6 +73,10 @@ like ($output, qr/7\s+1\s+0\s+6/, 'history.monthly - last month');
like ($output, qr/2\s+3\s+3\s+-4/, 'history.monthly - this month');
like ($output, qr/4\s+2\s+1\s+1/, 'history.monthly - average');
$output = qx{../src/task rc:$rc ghistory.monthly rc._forcecolor:on 2>&1};
like ($output, qr/7.+1.+$/m, 'ghistory.monthly - last month');
like ($output, qr/2.+3.+3.+$/m, 'ghistory.monthly - this month');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data), $rc;
exit 0;