Unit Tests - oldest, tag

- Fixed oldest.t unit tests that relied on "task oldest 3" instead of
  the new "task oldest limit:3".
- Fixed tag.t so that it uses example tags +one +two instead of the
  original +1 +2, because when it comes time to remove those tags
  with -1 -2, the tags are interpreted as a malformed sequence.
This commit is contained in:
Paul Beckingham 2009-06-18 23:23:07 -04:00
parent 3ffb855956
commit 20bd2cf594
2 changed files with 10 additions and 10 deletions

View file

@ -78,7 +78,7 @@ like ($output, qr/nine/, 'oldest: nine');
like ($output, qr/ten/, 'oldest: ten');
unlike ($output, qr/eleven/, 'no: eleven');
$output = qx{../task rc:oldest.rc oldest 3};
$output = qx{../task rc:oldest.rc oldest limit:3};
like ($output, qr/one/, 'oldest: one');
like ($output, qr/two/, 'oldest: two');
like ($output, qr/three/, 'oldest: three');
@ -104,7 +104,7 @@ like ($output, qr/nine/, 'newest: nine');
like ($output, qr/ten/, 'newest: ten');
like ($output, qr/eleven/, 'newest: eleven');
$output = qx{../task rc:oldest.rc newest 3};
$output = qx{../task rc:oldest.rc newest limit:3};
unlike ($output, qr/one/, 'no: one');
unlike ($output, qr/two/, 'no: two');
unlike ($output, qr/three/, 'no: three');

View file

@ -39,20 +39,20 @@ if (open my $fh, '>', 'tag.rc')
}
# Add task with tags.
my $output = qx{../task rc:tag.rc add +1 This +2 is a test +3; ../task rc:tag.rc info 1};
like ($output, qr/^Tags\s+1 2 3\n/m, 'tags found');
my $output = qx{../task rc:tag.rc add +one This +two is a test +three; ../task rc:tag.rc info 1};
like ($output, qr/^Tags\s+one two three\n/m, 'tags found');
# Remove tags.
$output = qx{../task rc:tag.rc 1 -3 -2 -1; ../task rc:tag.rc info 1};
unlike ($output, qr/^Tags/m, '-3 -2 -1 tag removed');
$output = qx{../task rc:tag.rc 1 -three -two -one; ../task rc:tag.rc info 1};
unlike ($output, qr/^Tags/m, '-three -two -one tag removed');
# Add tags.
$output = qx{../task rc:tag.rc 1 +4 +5 +6; ../task rc:tag.rc info 1};
like ($output, qr/^Tags\s+4 5 6\n/m, 'tags found');
$output = qx{../task rc:tag.rc 1 +four +five +six; ../task rc:tag.rc info 1};
like ($output, qr/^Tags\s+four five six\n/m, 'tags found');
# Remove tags.
$output = qx{../task rc:tag.rc 1 -4 -5 -6; ../task rc:tag.rc info 1};
unlike ($output, qr/^Tags/m, '-4 -5 -6 tag removed');
$output = qx{../task rc:tag.rc 1 -four -five -six; ../task rc:tag.rc info 1};
unlike ($output, qr/^Tags/m, '-four -five -six tag removed');
# Add and remove tags.
$output = qx{../task rc:tag.rc 1 +duplicate -duplicate; ../task rc:tag.rc info 1};