blob: 43036dd121aadbe8787b85b4f856d1ce7754e78a (
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 2017 Yahoo Holdings. 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);
|