01-08-28 15.57, skrev Michael G Schwern på schwern@pobox.com följande: > On Tue, Aug 28, 2001 at 02:25:06PM +0100, Nicholas Clark wrote: >> Another would be to make a small ok function from something that can be >> cut&pasted into any of the core perl tests (ie stuff before lib/) > > God, you're, like, *SO* last night. ;) I already did this, it's in > perlhack. > > >> Something that will issue a comment using caller() to find the line number >> of the failing test, and let the user pass in names for the tests. > > I'll patch this in. > > --- t/op/pack.t 2001/08/28 13:54:46 1.1 > +++ t/op/pack.t 2001/08/28 13:55:52 > @@ -19,6 +19,8 @@ > $out .= "ok $test\n"; > print $out; > > + printf "# Failed test at line %d\n", (caller)[2] unless $ok; > + > $test++; > return $ok; > } > --- pod/perlhack.pod 2001/08/28 13:54:34 1.1 > +++ pod/perlhack.pod 2001/08/28 13:55:17 > @@ -1489,6 +1489,8 @@ > $out .= "ok $test\n"; > print $out; > > + printf "# Failed test at line %d\n", (caller)[2] unless $ok; > + > $test++; > return $ok; > } > > > Applied! Thanks. -- ArthurThread Previous | Thread Next