Bugzilla – Attachment 66704 Details for
Bug 10112
add test for ./debian/control file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10112 - add test for ./debian/control* files
Bug-10112---add-test-for-debiancontrol-files.patch (text/plain), 2.60 KB, created by
Kyle M Hall (khall)
on 2017-09-01 10:45:35 UTC
(
hide
)
Description:
Bug 10112 - add test for ./debian/control* files
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-09-01 10:45:35 UTC
Size:
2.60 KB
patch
obsolete
>From 839e705035762c98b6c11e9894b67a5062e71f2d Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 25 Apr 2013 04:16:25 +1200 >Subject: [PATCH] Bug 10112 - add test for ./debian/control* files > >to test, apply patch... > >1/ install libparse-debcontrol-perl package > apt-get install libparse-debcontrol-perl > >2/ run successful tests > $ 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 > >3/ add some bad syntax to a file > $ sed -i -e '20i -------\' ./debian/control.in > >4/ run failed tests > $ 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index c4f5409..0e46c3d 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/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; >diff --git a/debian/control b/debian/control >index 209828f..fe7b572 100644 >--- a/debian/control >+++ b/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, >diff --git a/t/00-valid-debian-control-file.t b/t/00-valid-debian-control-file.t >new file mode 100644 >index 0000000..e4d540f >--- /dev/null >+++ b/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; >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10112
:
17664
|
17751
|
64313
|
65654
| 66704