X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FSuppressions.pm;h=fde934c050948e0a047b554664483b029364c1e7;hb=ad65b4599d66c8cc26dedada4d994aa8faebfcd7;hp=cb3bd7ae210dcaf95bdd7e5968d4683dee70560e;hpb=08860dad1f820cce06758ec4add9353a4dbc8175;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Suppressions.pm b/lib/Test/Valgrind/Suppressions.pm index cb3bd7a..fde934c 100644 --- a/lib/Test/Valgrind/Suppressions.pm +++ b/lib/Test/Valgrind/Suppressions.pm @@ -9,11 +9,11 @@ Test::Valgrind::Suppressions - Generate suppressions for given tool and command. =head1 VERSION -Version 1.10 +Version 1.11 =cut -our $VERSION = '1.10'; +our $VERSION = '1.11'; =head1 DESCRIPTION @@ -88,6 +88,26 @@ sub generate { return $status; } +=head2 C + +Removes all wildcard frames at the end of the suppression. +Moreover, C<'...'> is appended when C C<3.4.0> or higher is used. +Returns the mangled suppression. + +=cut + +sub strip_tail { + shift; + + my ($sess, $supp) = @_; + + 1 while $supp =~ s/[^\r\n]*:\s*\*\s*$//; + # With valgrind 3.4.0, we can replace unknown series of frames by '...' + $supp .= "...\n" if $sess->version ge '3.4.0'; + + $supp; +} + =head1 SEE ALSO L, L, L, L.