diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/scripts/03-strict | |
parent | Initial commit. (diff) | |
download | lintian-upstream.tar.xz lintian-upstream.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
l--------- | t/scripts/03-strict/bin.t | 1 | ||||
l--------- | t/scripts/03-strict/lib.t | 1 | ||||
l--------- | t/scripts/03-strict/private.t | 1 | ||||
-rwxr-xr-x | t/scripts/03-strict/runner.pl | 47 | ||||
l--------- | t/scripts/03-strict/test-scripts.t | 1 |
5 files changed, 51 insertions, 0 deletions
diff --git a/t/scripts/03-strict/bin.t b/t/scripts/03-strict/bin.t new file mode 120000 index 0000000..c316f2d --- /dev/null +++ b/t/scripts/03-strict/bin.t @@ -0,0 +1 @@ +runner.pl
\ No newline at end of file diff --git a/t/scripts/03-strict/lib.t b/t/scripts/03-strict/lib.t new file mode 120000 index 0000000..c316f2d --- /dev/null +++ b/t/scripts/03-strict/lib.t @@ -0,0 +1 @@ +runner.pl
\ No newline at end of file diff --git a/t/scripts/03-strict/private.t b/t/scripts/03-strict/private.t new file mode 120000 index 0000000..c316f2d --- /dev/null +++ b/t/scripts/03-strict/private.t @@ -0,0 +1 @@ +runner.pl
\ No newline at end of file diff --git a/t/scripts/03-strict/runner.pl b/t/scripts/03-strict/runner.pl new file mode 100755 index 0000000..79f4933 --- /dev/null +++ b/t/scripts/03-strict/runner.pl @@ -0,0 +1,47 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Const::Fast; +use Test::More; + +use Test::Lintian; + +const my $DOT => q{.}; + +if ($ENV{'LINTIAN_COVERAGE'}) { + plan 'skip_all' => 'Not needed for coverage of Lintian'; +} + +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_BASE'} //= $DOT; +# Files in commands check for the presence of LINTIAN_INCLUDE_DIRS in +# BEGIN, so make sure it is present for them. +$ENV{'LINTIAN_INCLUDE_DIRS'} = $ENV{'LINTIAN_BASE'}; + +if ($0 =~ m{^(?:.*/)?reporting\.t$}) { + # html_reports loads ./config, so we have do chdir before checking it. + my $folder = "$ENV{LINTIAN_BASE}/reporting"; + chdir($folder) + or die "Cannot change directory $folder"; + + all_perl_files_ok($DOT); + +} else { + my @test_paths = program_name_to_perl_paths($0); + all_perl_files_ok(@test_paths); +} + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 sr et diff --git a/t/scripts/03-strict/test-scripts.t b/t/scripts/03-strict/test-scripts.t new file mode 120000 index 0000000..c316f2d --- /dev/null +++ b/t/scripts/03-strict/test-scripts.t @@ -0,0 +1 @@ +runner.pl
\ No newline at end of file |