@@ -, +, @@ apt-get install libparse-debcontrol-perl $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly ok 2 - parsed ./debian/control.in file cleanly $ sed -i -e '20i -------\' ./debian/control.in $ perl ./t/00-valid-debian-control-file.t 1..2 ok 1 - parsed ./debian/control file cleanly not ok 2 - parsed ./debian/control.in file cleanly --- C4/Installer/PerlDependencies.pm | 5 +++++ debian/control | 1 + t/00-valid-debian-control-file.t | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 t/00-valid-debian-control-file.t --- a/C4/Installer/PerlDependencies.pm +++ a/C4/Installer/PerlDependencies.pm @@ -862,6 +862,11 @@ our $PERL_DEPS = { 'required' => '0', 'min_ver' => '0.07', }, + 'Parse::DebControl' => { + 'usage' => 'Test Debian control* files', + 'required' => '0', + 'min_ver' => '2.005', + }, }; 1; --- a/debian/control +++ a/debian/control @@ -319,6 +319,7 @@ Depends: libalgorithm-checkdigits-perl, libnet-z3950-zoom-perl, libnumber-format-perl, libopenoffice-oodoc-perl, + libparse-debcontrol-perl libpath-tiny-perl, libpdf-api2-perl, libpdf-api2-simple-perl, --- a/t/00-valid-debian-control-file.t +++ a/t/00-valid-debian-control-file.t @@ -0,0 +1,23 @@ +use Modern::Perl; +use Parse::DebControl; +use Test::More; + +plan tests => 2; + +my $parser = new Parse::DebControl; + +$parser->DEBUG(); + +my %opt = ( 'stripComments' => 1, ); + +my $rc; +eval { + + local $SIG{__WARN__} = sub { }; # perls arcane syntax to shush stderr?! + $rc = $parser->parse_file( './debian/control', \%opt ); +}; + +isnt( $rc, undef, "parsed ./debian/control file without errors" ); +isnt( $rc, undef, "parsed ./debian/control.in file without errors" ); + +1; --