tokuhirom / Test-Pretty

Other
20 stars 17 forks source link

uninitialized value warnings #1

Closed doy closed 11 years ago

doy commented 11 years ago
$ perl -MTest::Pretty -Ilib t/basic.t
Use of uninitialized value $lineno in subtraction (-) at /home/doy/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/Test/Pretty.pm line 39.
Use of uninitialized value $line in substitution (s///) at /home/doy/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/Test/Pretty.pm line 40.
✓  basic test
Use of uninitialized value $lineno in subtraction (-) at /home/doy/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/Test/Pretty.pm line 39.
Use of uninitialized value $line in substitution (s///) at /home/doy/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/Test/Pretty.pm line 40.
✓  no exceptions for basic test

This is when running tests from the Text::Handlebars test suite. It probably has something to do with the fiddling around I'm doing with $Test::Builder::Level.

tokuhirom commented 11 years ago

Ah, your $Test::Builder::Level operation is bad. You don't need to increment $Test::Builder::Level at first function, see https://github.com/tokuhirom/text-handlebars/commit/12631bd7e7c151640b7695768455ee98dab942b6 and Test::More's code.

And, I added better diag for this issue at 0.06 release.

Thanks.

doy commented 11 years ago

Thanks!