Unit Tests

- Added test to illustrate the workaround.
This commit is contained in:
Paul Beckingham 2012-02-26 14:02:40 -05:00
parent 1f5146e7a0
commit 5396c718ef

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 4;
use Test::More tests => 5;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
@ -47,6 +47,10 @@ qx{../src/task rc:bug.rc add foo \\(bar\\)};
$output = qx{../src/task rc:bug.rc ls};
like ($output, qr/foo \(bar\)/, "foo \(bar\) -- preserved");
qx{../src/task rc:bug.rc add \\'baz \\(qux\\)\\'};
$output = qx{../src/task rc:bug.rc ls};
like ($output, qr/baz \(qux\)/, "baz \(qux\) -- preserved");
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc);
ok (! -r 'pending.data' &&