diff options
author | Jim Cromie <jcromie@cpan.org> | 2004-05-17 03:19:00 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-05-17 15:08:40 +0000 |
commit | 7ce9b5fb929d8db597cb08c830ef116cfd1fd078 (patch) | |
tree | 52811136a6147d989ae152de3f76e237088f798e /ext/B | |
parent | 5f18268ba678b36b46284b6b8b13d49fde5909a1 (diff) | |
download | perl-7ce9b5fb929d8db597cb08c830ef116cfd1fd078.tar.gz |
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
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/t/f_sort.t | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t index 5a0c55be9b..f03b8cdc3e 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; }, |