diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 20:15:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-14 20:15:44 +0000 |
commit | 1a42a93b11c48e696446250f2a1f1ca71b350e9b (patch) | |
tree | 900e3702d59f6d7cae8f7def94ed5194602f6846 /t/syntax | |
parent | Initial commit. (diff) | |
download | debhelper-1a42a93b11c48e696446250f2a1f1ca71b350e9b.tar.xz debhelper-1a42a93b11c48e696446250f2a1f1ca71b350e9b.zip |
Adding upstream version 13.3.4.upstream/13.3.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/syntax')
l--------- | t/syntax/syntax-libs.t | 1 | ||||
-rwxr-xr-x | t/syntax/syntax-progs.t | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/t/syntax/syntax-libs.t b/t/syntax/syntax-libs.t new file mode 120000 index 0000000..fedf32e --- /dev/null +++ b/t/syntax/syntax-libs.t @@ -0,0 +1 @@ +syntax-progs.t
\ No newline at end of file diff --git a/t/syntax/syntax-progs.t b/t/syntax/syntax-progs.t new file mode 100755 index 0000000..93d00bb --- /dev/null +++ b/t/syntax/syntax-progs.t @@ -0,0 +1,28 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More; + +use File::Basename qw(dirname); +use lib dirname(dirname(__FILE__)); +# Need Test::More to set PERL5LIB +use Test::DH; + +use Config; +my $binpath = $ENV{AUTOPKGTEST_TMP} ? '/usr/bin' : '.'; +my $libpath = $ENV{AUTOPKGTEST_TMP} ? $Config{vendorlib} : 'lib'; + +my @targets; +if ($0 =~ m{syntax-progs\.t$}) { + @targets = grep { -x $_ } glob("$binpath/dh_*"), "$binpath/dh"; +} else { + @targets = (glob("$libpath/Debian/Debhelper/*.pm"), glob("$libpath/Debian/Debhelper/*/*.pm")); +} + +plan(tests => scalar(@targets)); + +foreach my $file (@targets) { + is(system("perl -c $file >/dev/null 2>&1"), 0) + or diag("$file failed syntax check"); +} + |