Unit Tests - confirmation, delete, subst, undo

- Modified unit tests to accommodate changes in the verbose output
  of task.
- Added tests to verify /delete-me// substitutions.
- Fixed typos in test descriptions.
This commit is contained in:
Paul Beckingham
2009-05-07 00:26:49 -04:00
parent 98391a0c24
commit fea19e036a
4 changed files with 25 additions and 15 deletions

View File

@@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 7;
use Test::More tests => 9;
# Create the rc file.
if (open my $fh, '>', 'subst.rc')
@@ -58,6 +58,16 @@ qx{../task rc:subst.rc 1 /bar/BAR/g};
$output = qx{../task rc:subst.rc info 1};
like ($output, qr/BAR BAR BAR/, 'global substitution in annotation');
qx{../task rc:subst.rc 1 /FOO/aaa/};
qx{../task rc:subst.rc 1 /FOO/bbb/};
qx{../task rc:subst.rc 1 /FOO/ccc/};
$output = qx{../task rc:subst.rc info 1};
like ($output, qr/aaa bbb ccc/, 'individual successive substitution in description');
qx{../task rc:subst.rc 1 /bbb//};
$output = qx{../task rc:subst.rc info 1};
like ($output, qr/aaa ccc/, 'word deletion in description');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');