From c8f2b5a858fe80c12403961bb0c0beee487e54a3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 3 Jul 2014 17:19:36 -0400 Subject: [PATCH] Unit Tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed flapping in bug.932.t. The problem was a regex that assumeѕ the age of the task was < 1second, but sometimes, when the creation of a task and the reporting of a task crossed a 1-second boundary, the age shows up as '1s'. With the regex now more permissive, the problem is gone. --- test/bug.932.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bug.932.t b/test/bug.932.t index 46d47a0c4..f3044fcec 100755 --- a/test/bug.932.t +++ b/test/bug.932.t @@ -53,15 +53,15 @@ like ($output, qr/4.+R/ms, 'Found child 2'); qx{echo 'y' | ../src/task rc:bug.rc 2 mod project:P 2>&1}; $output = qx{../src/task rc:bug.rc list 2>&1}; -like ($output, qr/2\s+P.+R/ms, 'Found modified child 0'); -like ($output, qr/3\s+P.+R/ms, 'Found modified child 1 (propagated from 0)'); -like ($output, qr/4\s+P.+R/ms, 'Found modified child 2 (propagated from 0)'); +like ($output, qr/2.+P.+R/ms, 'Found modified child 0'); +like ($output, qr/3.+P.+R/ms, 'Found modified child 1 (propagated from 0)'); +like ($output, qr/4.+P.+R/ms, 'Found modified child 2 (propagated from 0)'); qx{echo 'y' | ../src/task rc:bug.rc 1 mod priority:H 2>&1}; $output = qx{../src/task rc:bug.rc list 2>&1}; -like ($output, qr/2\s+H.+P.+R/ms, 'Found modified child 0 (propagated from parent'); -like ($output, qr/3\s+H.+P.+R/ms, 'Found modified child 1 (propagated from parent)'); -like ($output, qr/4\s+H.+P.+R/ms, 'Found modified child 2 (propagated from parent)'); +like ($output, qr/2.+H.+P.+R/ms, 'Found modified child 0 (propagated from parent'); +like ($output, qr/3.+H.+P.+R/ms, 'Found modified child 1 (propagated from parent)'); +like ($output, qr/4.+H.+P.+R/ms, 'Found modified child 2 (propagated from parent)'); $output = qx{../src/task rc:bug.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected');