From 2691f8f5654919643a505d72ab569c89fe7a2516 Mon Sep 17 00:00:00 2001 From: Brad Gilbert Date: Tue, 4 Feb 2014 10:20:26 -0600 Subject: [PATCH] Improve error diagnostics in t/test_pl/tempfile.t Tony: add a missing local --- t/test_pl/tempfile.t | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/t/test_pl/tempfile.t b/t/test_pl/tempfile.t index 51937c4..dba363e 100644 --- a/t/test_pl/tempfile.t +++ b/t/test_pl/tempfile.t @@ -22,16 +22,20 @@ sub skip_files{ } } + local $main::Level = $main::Level + 1; + my $common_mess = "skip $skip filenames to $to so that the next one will end with $next"; if( $last == $skip ){ if( $check eq $cmp ){ pass( $common_mess ); }else{ my($alpha) = $check =~ /\Atmp\d+([A-Z][A-Z]?)\Z/; - fail( $common_mess, "only skipped to $alpha" ) + fail( $common_mess ); + diag( "only skipped to $alpha" ); } }else{ - fail( $common_mess, "only skipped $last files" ); + fail( $common_mess ); + diag( "only skipped $last out of $skip files" ); } } -- 1.8.3.1