From d5fed80dcdc228bb13c5854df05c90227f00dff2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 27 Aug 2014 07:07:42 -0400 Subject: [PATCH] Unit Tests - Changes in debug output broke a test. Reduced string matching to make the tests more durable. --- test/color.err.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/color.err.t b/test/color.err.t index 1fb7d0c53..75ab3e469 100755 --- a/test/color.err.t +++ b/test/color.err.t @@ -51,10 +51,10 @@ if (open my $fh, '>', $rc) # Test the errors colors my $output = qx{../src/task rc:$rc rc.debug:on add foo priority:X 2>&1 >/dev/null}; -like ($output, qr/^\033\[33m The\ 'priority'\ attribute\ does\ not\ allow\ a\ value\ of\ 'X'\. \033\[0m$/xms, "$ut: color.error"); -like ($output, qr/^\033\[32m Timer\ Config::load\ \(.+$rc\) .* \033\[0m$/xms, "$ut: color.debug"); -like ($output, qr/^\033\[34m Using\ alternate\ .taskrc\ file\ /xms, "$ut: color.header"); -like ($output, qr/^\033\[31m Configuration\ override\ rc.debug:on \033\[0m$/xms, "$ut: color.footnote"); +like ($output, qr/^\033\[33mThe 'priority' attribute does not allow a value of 'X'\./ms, "$ut: color.error"); +like ($output, qr/^\033\[32mTimer Config::load \(.*?$rc\)/ms, "$ut: color.debug"); +like ($output, qr/^\033\[34mUsing alternate \.taskrc file/ms, "$ut: color.header"); +like ($output, qr/^\033\[31mConfiguration override rc\.debug:on/ms, "$ut: color.footnote"); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data), $rc;