1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-06 13:48:55 -04:00

Fix false positive in cpp_comments test

Add most common URI's in addition to http

Also remove unnecessary t::lib::Test import ( unavailable since 434aea64 )
This commit is contained in:
Peter Rabbitson 2017-05-05 00:43:14 +02:00
parent 9e4a7f3f77
commit 5433dc32f0

View file

@ -7,7 +7,6 @@ BEGIN {
}
use Test::More;
use t::lib::Test;
my @c_files = (<*.c>, <*.h>, <*.xs>);
plan tests => scalar(@c_files);
@ -25,7 +24,7 @@ foreach my $file (@c_files) {
$line++;
if (/^(.*)\/\//) {
my $m = $1;
if ($m !~ /\*/ && $m !~ /http:$/ && $m !~ m!"/*?$!) { # skip the // in c++ comment in parse.c
if ($m !~ /\*/ && $m !~ /(?:file|http|ftp):$/ && $m !~ m!"/*?$!) { # skip the // in c++ comment in parse.c
fail("C++ comment in $file line $line: $m");
next FILE;
}