Subject: | Bugs in png_barcode.t |
I noticed a couple of bugs in png_barcode.t test while packaging
Business::ISBN for Fedora.
The comma at the end of the 'skip' long is wrong - the unless clause
isn't a parameter.
Also, 'require' is preferred to 'use' unless we want to actually load
the module.
Patch to fix both of these is included. Without the patch, this test is
always skipped, even when GD::Barcode::EAN13 is loaded.
Subject: | perl-Business-ISBN-2.03-fix-barcode-test.patch |
--- Business-ISBN-2.03/t/png_barcode.t Wed Mar 14 03:21:08 2007
+++ Business-ISBN-2.03/t/png_barcode.t Fri Oct 26 14:58:15 2007
@@ -17,8 +17,8 @@
ok( $isbn->is_valid, "Valid ISBN" );
SKIP: {
- skip "Need GD::Barcode::EAN13", 2,
- unless eval "use GD::Barcode::EAN13";
+ skip "Need GD::Barcode::EAN13", 2
+ unless eval "require GD::Barcode::EAN13";
my $png = eval { $isbn->png_barcode };
ok( defined $png, "PNG defined" );