=head1 VERSION
-Version 1.10
+Version 1.11
=cut
-our $VERSION = '1.10';
+our $VERSION = '1.11';
=head1 DESCRIPTION
-This is a L<Test::Valgrind::Parser> object that can extract suppressions from C<valgrind>'s text output.
+This is a L<Test::Valgrind::Parser::Text> object that can extract suppressions from C<valgrind>'s text output.
=cut
+use Test::Valgrind::Suppressions;
+
use base qw/Test::Valgrind::Parser::Text Test::Valgrind::Carp/;
=head1 METHODS
sub report_class { 'Test::Valgrind::Report::Suppressions' }
-=head2 C<parse $session, $fh>
-
-Parses the filehandle C<$fh> fed with the output of F<valgrind --gen-suppressions=all> and sends a report to the session C<$session> for each suppression.
-
-=cut
-
sub parse {
my ($self, $sess, $fh) = @_;
if ($_ eq '{') { # A suppression block begins
$in = 1;
} elsif ($_ eq '}') { # A suppression block ends
- # With valgrind 3.4.0, we can replace unknown series of frames by '...'
- if ($sess->version ge '3.4.0') {
- my $unknown_tail;
- ++$unknown_tail while $s =~ s/(\n)\s*obj:\*\s*$/$1/;
- $s .= "...\n" if $unknown_tail;
- }
-
+ $s = Test::Valgrind::Suppressions->strip_tail($sess, $s); # Strip the tail
push @supps, $s; # Add the suppression that just ended to the list
$s = ''; # Reset the state
$in = 0;