}
if ( $line =~ /END TESH TESTS/ ) {
$dump = 0;
- last;
+ next;
}
if ($dump) {
$line =~ s/^ //;
if ( $command =~ /^mkfile\s+(\S+)/) {
my $file = $1;
# don't ask me to explain why so many backslashes...
- $input =~ s/\\/\\\\\\\\\\\\\\\\/g;
- $input =~ s/\n/\\\\\\\\n/g;
- $input =~ s/"/\\\\\\\\042/g;
- $input =~ s/'/\\\\\\\\047/g;
+ $input =~ s/\\/\\\\\\\\/g;
+ $input =~ s/\n/\\\\n/g;
+ $input =~ s/"/\\\\042/g;
+ $input =~ s/'/\\\\047/g;
$input =~ s/%/%%/g;
$command = "sh -c \"printf '$input' > $file\"";
}
}
close(TESH_FILE);
}
- elsif ( $line =~ /^\s*set_tests_properties/ ) {
- if ( $line =~ /set_tests_properties\(([\S]+)/ ) {
+ elsif ( $line =~ /^\s*SET_TESTS_PROPERTIES/ ) {
+ if ( $line =~ /SET_TESTS_PROPERTIES\(([\S]+)/ ) {
my ($name_temp) = ($1);
$line =~ s/$name_temp/memcheck-$name_temp-0/g;
print $line. "\n";
}
- }
- else {
+ } elsif ( $line =~ /^(\s*)ADD_TEST\((.*)\)/ ) {
+ print "$1ADD_TEST(memcheck-$2)\n";
+ } else {
print $line. "\n";
}
}