Generate #line in all blocks

Generate proper #line directives in all BEGIN_xxx blocks. Before,
there were #line directives for BEGIN_SUITE_HELPERS and BEGIN_CASE but
not BEGIN_HEADER, so debug information for code in the header block
pointed inside helpers.function instead of the test's source file.
This commit is contained in:
Gilles Peskine 2017-09-26 12:52:15 +02:00 committed by Andrzej Kurek
parent cd95756251
commit 2ba437ad3c

View File

@ -111,12 +111,7 @@ my @test_cases_lines = split/^/, <TEST_CASES>;
my $test_cases;
my $index = 2;
for my $line (@test_cases_lines) {
if ($line =~ /^\/\* BEGIN_SUITE_HELPERS .*\*\//)
{
$line = $line."#line $index \"$test_case_file\"\n";
}
if ($line =~ /^\/\* BEGIN_CASE .*\*\//)
if ($line =~ /^\/\* BEGIN_.*\*\//)
{
$line = $line."#line $index \"$test_case_file\"\n";
}