Unit Tests

- Now that the 'diagnostics' command can detect duplicate UUID
  values, it makes sense to incorporate that into unit tests that
  employ multiple recurring tasks.
This commit is contained in:
Paul Beckingham
2012-03-03 10:05:27 -05:00
parent 173d24b3fb
commit 524f7f0919
10 changed files with 40 additions and 10 deletions

View File

@@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 12;
use Test::More tests => 13;
# Create the rc file.
if (open my $fh, '>', 'annual.rc')
@@ -68,6 +68,9 @@ like ($output, qr/9\s+1\/1\/2007\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 9 no cre
like ($output, qr/10\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep');
like ($output, qr/11\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 11 no creep');
$output = qx{../src/task rc:annual.rc diag};
like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key annual.rc);
ok (! -r 'pending.data' &&