From: Jim Cromie Date: Mon, 17 May 2004 09:19:00 +0000 (-0600) Subject: Fix new B::Concise test output X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ce9b5fb929d8db597cb08c830ef116cfd1fd078;p=p5sagit%2Fp5-mst-13.2.git Fix new B::Concise test output Subject: Re: Smoke [5.9.2] 22820 FAIL(F) openbsd 3.5 (i386/1 cpu) Message-ID: <40A8D7E4.1020007@divsol.com> p4raw-id: //depot/perl@22824 --- diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t index 5a0c55b..f03b8cd 100644 --- a/ext/B/t/f_sort.t +++ b/ext/B/t/f_sort.t @@ -9,12 +9,19 @@ use OptreeCheck; plan tests => 20; -=for gentest +=head1 Test Notes # chunk: #!perl #examples poached from perldoc -f sort -=cut +NOTE: name is no longer a required arg for checkOptree, as label is +synthesized out of others. HOWEVER, if the test-code has newlines in +it, the label must be overridden by an explicit name. + +This is because t/TEST is quite particular about the test output it +processes, and multi-line labels violate its 1-line-per-test +expectations. + =for gentest # chunk: # sort lexically @@ -333,7 +340,7 @@ print sort @george, 'to', @harry; =cut -checkOptree(note => q{}, +checkOptree(name => q{sort USERSUB LIST }, bcopts => q{-exec}, todo => 'sort why BARE flag happens', code => q{sub backwards { $b cmp $a } @@ -463,7 +470,7 @@ sort { $b->[1] <=> $a->[1] =cut -checkOptree(note => q{}, +checkOptree(name => q{Compound sort/map Expression }, bcopts => q{-exec}, code => q{ @new = map { $_->[0] } sort { $b->[1] <=> $a->[1] || $a->[2] cmp $b->[2] } @@ -554,7 +561,7 @@ package main; =cut -checkOptree(note => q{}, +checkOptree(name => q{sort other::sub LIST }, bcopts => q{-exec}, code => q{package other; sub backwards ($$) { $_[1] cmp $_[0]; } package main; @new = sort other::backwards @old; }, diff --git a/t/TEST b/t/TEST index 5d5727a..7210d2f 100755 --- a/t/TEST +++ b/t/TEST @@ -447,7 +447,8 @@ EOT } else { $next += 1; - print "${te}FAILED at test $next\n"; + print "${te}FAILED at test $next"; + print ($next > $max) ? "\tpossibly due to extra output\n" : "\n"; $bad = $bad + 1; $_ = $test; if (/^base/) {