From 2da3258dd028ceb3945975b4f57a4ca78120b5d2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 May 2014 18:02:13 -0400 Subject: [PATCH] Unit Tests - Corrected one time stamp, but not all. - Removed useless setup/teardown tests. --- test/uuid.t | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/uuid.t b/test/uuid.t index 886a98fd4..872b3ffac 100755 --- a/test/uuid.t +++ b/test/uuid.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More tests => 24; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -43,7 +43,6 @@ if (open my $fh, '>', 'uuid.rc') "report.unittest.filter=status:pending\n", "report.unittest.sort=id\n"; close $fh; - ok (-r 'uuid.rc', 'Created uuid.rc'); } if (open my $fh, '>', 'pending.data') @@ -99,27 +98,21 @@ like ($output, qr/UUNNDDOO/, 'task UUNNDDOO modified status to pending'); $output = qx{../src/task rc:uuid.rc completed 2>&1}; unlike ($output, qr/UUNNDDOO/, 'task does not list UUNNDDOO after modification'); -qx{../src/task rc:uuid.rc d71d3566-7a6b-4c32-8f0b-6de75bb9397b modify start:1293796800 2>&1}; +qx{../src/task rc:uuid.rc d71d3566-7a6b-4c32-8f0b-6de75bb9397b modify start:12/31/2010 2>&1}; $output = qx{../src/task rc:uuid.rc unittest 2>&1}; like ($output, qr/12\/31\/2010/, 'modified start date of task ssttaarrtt'); -qx{../src/task rc:uuid.rc 727baa6c-65b8-485e-a810-e133e3cd83dc modify end:1293796800 2>&1}; +qx{../src/task rc:uuid.rc 727baa6c-65b8-485e-a810-e133e3cd83dc modify end:12/31/2010 2>&1}; $output = qx{../src/task rc:uuid.rc completed 2>&1}; like ($output, qr/12\/31\/2010/, 'modified end date of task eenndd'); -qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify entry:1293710400 2>&1}; -qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify start:1293883200 2>&1}; +qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify entry:12/30/2010 2>&1}; +qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify start:1/1/2011 2>&1}; $output = qx{../src/task rc:uuid.rc unittest 2>&1}; like ($output, qr/12\/30\/2010/, 'modified entry date of task three'); like ($output, qr/1\/1\/2011/, 'added start date of task three with modify'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data uuid.rc); -ok (! -r 'pending.data' && - ! -r 'completed.data' && - ! -r 'undo.data' && - ! -r 'backlog.data' && - ! -r 'uuid.rc', 'Cleanup'); - exit 0;