Unit Tests

- More robust tests strategy: captured outputs are always compared to some
  expected result.
- Clearer and more consistent test.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
Louis-Claude Canon
2013-01-19 12:38:25 -05:00
committed by Paul Beckingham
parent ee7fd7add0
commit a0d6b3198e
16 changed files with 67 additions and 35 deletions

View File

@@ -42,9 +42,9 @@ if (open my $fh, '>', 'bug.rc')
# correct urgency and depend on 0 when edited
qx{../src/task rc:bug.rc add one 2>&1};
qx{../src/task rc:bug.rc add two dep:1 2>&1};
my $output = qx{../src/task rc:bug.rc long 2>&1};
qx{../src/task rc:bug.rc long 2>&1};
$output = qx{../src/task rc:bug.rc 1 _urgency 2>&1};
my $output = qx{../src/task rc:bug.rc 1 _urgency 2>&1};
like ($output, qr/ 8\n/, 'blocking urgency == 8');
$output = qx{../src/task rc:bug.rc 2 _urgency 2>&1};