In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/332878e1ede268223970e2ddec708901541910d4?hp=b2d32ffb25539e36e18d4e4d11483f75d2b53b18>

- Log -----------------------------------------------------------------
commit 332878e1ede268223970e2ddec708901541910d4
Author: Nicholas Clark <n...@ccl4.org>
Date:   Fri Feb 4 11:32:55 2011 +0000

    In B's tests, fix calls to like() which weren't being passed a regexp.
    
    Now that the tests actually *test*, this reveals that one of the tests 
wasn't
    actually correct. Fix that, and in the process make the particular error
    message clearer and more consistent.
-----------------------------------------------------------------------

Summary of changes:
 ext/B/t/OptreeCheck.pm |    2 +-
 ext/B/t/concise.t      |    2 +-
 ext/B/t/optree_check.t |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ext/B/t/OptreeCheck.pm b/ext/B/t/OptreeCheck.pm
index 50ea85e..164f561 100644
--- a/ext/B/t/OptreeCheck.pm
+++ b/ext/B/t/OptreeCheck.pm
@@ -733,7 +733,7 @@ sub mkCheckRex {
     $str =~ s/leavesub \[\d\]/leavesub [\\d]/msg;      # for -terse
     #$str =~ s/(\s*)\n/\n/msg;                         # trailing spaces
     
-    croak "no reftext found for $want: $tc->{name}"
+    croak "whitespace only reftext found for '$want': $tc->{name}"
        unless $str =~ /\w+/; # fail unless a real test
     
     # $str = '.*'      if 1;   # sanity test
diff --git a/ext/B/t/concise.t b/ext/B/t/concise.t
index 075e1da..faff8a3 100644
--- a/ext/B/t/concise.t
+++ b/ext/B/t/concise.t
@@ -92,7 +92,7 @@ SKIP: {
 my @stylespec;
 $@='';
 eval { add_style ('junk_B' => @stylespec) };
-like ($@, 'expecting 3 style-format args',
+like ($@, qr/expecting 3 style-format args/,
     "add_style rejects insufficient args");
 
 @stylespec = (0,0,0); # right length, invalid values
diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t
index 8d3c062..1c55fb6 100644
--- a/ext/B/t/optree_check.t
+++ b/ext/B/t/optree_check.t
@@ -84,7 +84,7 @@ if (1) {
                      expect    => '',
                      expect_nt => '');
     };
-    like($@, /no '\w+' golden-sample found/, "empty expectations prevented");
+    like($@, qr/no '\w+' golden-sample found/, "empty expectations prevented");
     
     $@='';
     eval {
@@ -95,7 +95,7 @@ if (1) {
                      expect_nt => "\n",
                      expect    => "\n");
     };
-    like($@, /no '\w+' golden-sample found/,
+    like($@, qr/whitespace only reftext found for '\w+'/,
         "just whitespace expectations prevented");
 }
     

--
Perl5 Master Repository

Reply via email to