1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00
DBD-SQLite-SQLcipher/t/90cppcomments.t
Adam Kennedy a3ff0b1f7c All tests run under the same Perl environment
(autoflush on, and warnings enabled via $^W = 1)
2009-04-03 14:25:58 +00:00

32 lines
585 B
Perl

#!/usr/bin/perl
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
use Test::More;
use Fatal qw(open);
use DBI;
my @c_files = <*.c>, <*.xs>;
plan tests => scalar(@c_files);
FILE:
foreach my $file (@c_files) {
open(F, $file);
my $line = 0;
while (<F>) {
$line++;
if (/^(.*)\/\//) {
my $m = $1;
if ($m !~ /\*/ && $m !~ /http:$/) { # skip the // in c++ comment in parse.c
fail("C++ comment in $file line $line");
next FILE;
}
}
}
pass("$file has no C++ comments");
close(F);
}