[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.12-68-g85d4e74



The following commit has been merged in the master branch:
commit 85d4e745ecc9ca47682a426d6822f48112b97f64
Author: Niels Thykier <niels@thykier.net>
Date:   Sat May 4 22:24:03 2013 +0200

    t/scripts/strict.t: Test our checks + missing "use warnings"
    
    Enable the test for missing "use warnings;" in all files.  Also add
    "strict_ok" and "warnings_ok" tests for our checks.  The "syntax_ok"
    does not like our checks, but they are covered by "check-load.t"
    anyway.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/t/scripts/strict.t b/t/scripts/strict.t
index 71397a1..8125e60 100755
--- a/t/scripts/strict.t
+++ b/t/scripts/strict.t
@@ -8,11 +8,24 @@ use Test::More;
 eval 'use Test::Strict';
 plan skip_all => 'Test::Strict required to run this test' if $@;
 
+{
+    no warnings 'once';
+    $Test::Strict::TEST_WARNINGS = 1;
+}
+
 $ENV{'LINTIAN_ROOT'} //= '.';
 
 my @DIRS = map { "$ENV{'LINTIAN_ROOT'}/$_" } qw(lib private frontend collection);
+my @CHECKS = glob("$ENV{'LINTIAN_ROOT'}/checks/*[!.]*[!c]");
 all_perl_files_ok(@DIRS);
 
+for my $check (@CHECKS) {
+    # syntax_ok does not like our checks.  However, those are covered
+    # by check-load.t, so it is not a huge problem.
+    strict_ok($check);
+    warnings_ok($check);
+}
+
 # html_reports loads ./config, so we have do chdir before checking it.
 chdir("$ENV{'LINTIAN_ROOT'}/reporting");
 all_perl_files_ok('.');

-- 
Debian package checker


Reply to: