From f0047d3230fc461fd73cd320460e2d28aa944e73 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 27 Apr 2000 04:51:47 +0000 Subject: [PATCH] better diagnostics on failed tests (from Ilya Zakharevich) p4raw-id: //depot/perl@5956 --- t/op/lex_assign.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t index 2fb059d..836cdba 100755 --- a/t/op/lex_assign.t +++ b/t/op/lex_assign.t @@ -112,11 +112,12 @@ for (@INPUT) { $ord++; ($op, undef, $comment) = /^([^\#]+)(\#\s+(.*))?/; $comment = $op unless defined $comment; + chomp; $op = "$op==$op" unless $op =~ /==/; ($op, $expectop) = $op =~ /(.*)==(.*)/; $skip = ($op =~ /^'\?\?\?'/ or $comment =~ /skip\(.*\Q$^O\E.*\)/i) - ? "skip" : "not"; + ? "skip" : "# '$_'\nnot"; $integer = ($comment =~ /^i_/) ? "use integer" : '' ; (print "#skipping $comment:\nok $ord\n"), next if $skip eq 'skip'; @@ -137,7 +138,7 @@ EOE print "# skipping $comment: unimplemented:\nok $ord\n"; } else { warn $@; - print "not ok $ord\n"; + print "# '$_'\nnot ok $ord\n"; } } } @@ -146,6 +147,7 @@ for (@simple_input) { $ord++; ($op, undef, $comment) = /^([^\#]+)(\#\s+(.*))?/; $comment = $op unless defined $comment; + chomp; ($operator, $variable) = /^\s*(\w+)\s*\$(\w+)/ or warn "misprocessed '$_'\n"; eval <