Bug#506182: Doesn't comment out diag lines preceded by a blank line

Matt Kraai kraai at ftbfs.org
Tue Nov 18 23:59:13 UTC 2008


Package: libtest-simple-perl
Version: 0.84-1
Tags: fixed-upstream

Howdy,

When I run "make test" on Parrot, it has the following test failure:

> t/perl/Parrot_Test..........................NOK 66/66                        
> #   Failed test 'pir_error_output_like: todo'
> #   at t/perl/Parrot_Test.t line 313.
> # STDERR is:
> # #   Failed (TODO) test 'pir_error_output_like: todo'
> # #   at t/perl/Parrot_Test.t line 306.
> # # Expected error but exited cleanly
> # # Received:
> # # foo
> # # 
> # Expected:
> # # /bar/
> # # 
> # 
> not:
> # #   Failed (TODO) test 'pir_error_output_like: todo'
> # #   at t/perl/Parrot_Test.t line 306.
> # # Expected error but exited cleanly
> # # Received:
> # # foo
> # # 
> # # Expected:
> # # /bar/
> # # 
> # 
> as expected
> t/perl/Parrot_Test..........................FAILED test 66                   
> 	Failed 1/66 tests, 98.48% okay

The "Expected:" line is printed by diag, so should be commented out.
This is done for most lines by the following code from _print_to_fh:

    $msg =~ s/\n(.)/\n# $1/sg;

but this doesn't comment out lines preceded by a blank line.  This has
been fixed in version 0.86 of Test-Simple, which performs the
following in diag:

    $msg =~ s/^/# /gm;

-- 
Matt                                                 http://ftbfs.org/

P.S. Why doesn't libtest-simple-perl show up on the Debian Perl Group
packages overview page?





More information about the pkg-perl-maintainers mailing list