blob: 3b56873c775c23ce00c8e36e2382182e7e96bcb2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#
# That that all perl files use strict and warnings
#
use Test::More;
use TestUtils::VespaTest;
use strict;
use warnings;
my @dirs = (
'../bin',
'../lib',
'Yahoo/Vespa/Mocks'
);
my $checkdirs = join(' ', @dirs);
my @files = `find $checkdirs -name \\*.pm -or -name \\*.pl`;
chomp @files;
printTest "Checking " . (scalar @files) . " files for includes.\n";
foreach my $file (@files) {
ok( system("cat $file | grep 'use strict;' >/dev/null") == 0,
"$file use strict" );
ok( system("cat $file | grep 'use warnings;' >/dev/null") == 0,
"$file use warnings" );
}
done_testing();
exit(0);
|