r27314 - in /branches/upstream/libsane-perl/current: Changes META.yml README lib/Sane.pm t/data.t t/err.t t/non-blocking.t t/options.t
ra28145-guest at users.alioth.debian.org
ra28145-guest at users.alioth.debian.org
Wed Nov 26 20:16:42 UTC 2008
Author: ra28145-guest
Date: Wed Nov 26 20:16:39 2008
New Revision: 27314
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27314
Log:
[svn-upgrade] Integrating new upstream version, libsane-perl (0.02)
Modified:
branches/upstream/libsane-perl/current/Changes
branches/upstream/libsane-perl/current/META.yml
branches/upstream/libsane-perl/current/README
branches/upstream/libsane-perl/current/lib/Sane.pm
branches/upstream/libsane-perl/current/t/data.t
branches/upstream/libsane-perl/current/t/err.t
branches/upstream/libsane-perl/current/t/non-blocking.t
branches/upstream/libsane-perl/current/t/options.t
Modified: branches/upstream/libsane-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/Changes?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/Changes (original)
+++ branches/upstream/libsane-perl/current/Changes Wed Nov 26 20:16:39 2008
@@ -1,6 +1,9 @@
Revision history for Perl extension SANE.
-0.01 Mon Aug 25 16:37:33 2008
+0.02 Wed Nov 26 20:45:00 2008
+ - Skip most tests if we don't have libsane 1.0.19
+ - Fix symbol names in write_pnm_header
+
+0.01 Tue Nov 18 20:31:00 2008
- original version; created by h2xs 1.23 with options
-A -n Sane
-
Modified: branches/upstream/libsane-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/META.yml?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/META.yml (original)
+++ branches/upstream/libsane-perl/current/META.yml Wed Nov 26 20:16:39 2008
@@ -1,11 +1,11 @@
--- #YAML:1.0
name: Sane
-version: 0.01
+version: 0.02
abstract: Perl extension for the SANE (Scanner Access Now Easy) Project
license: ~
author:
- Jeffrey Ratcliffe
-generated_by: ExtUtils::MakeMaker version 6.42
+generated_by: ExtUtils::MakeMaker version 6.44
distribution_type: module
requires:
meta-spec:
Modified: branches/upstream/libsane-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/README?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/README (original)
+++ branches/upstream/libsane-perl/current/README Wed Nov 26 20:16:39 2008
@@ -1,7 +1,5 @@
-SANE version 0.01
-=================
-
Sane - Perl extension for the SANE (Scanner Access Now Easy) Project
+====================================================================
This module allows you to access SANE-compatible scanners in a Perlish and
object-oriented way, freeing you from the casting and memory management in C,
Modified: branches/upstream/libsane-perl/current/lib/Sane.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/lib/Sane.pm?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/lib/Sane.pm (original)
+++ branches/upstream/libsane-perl/current/lib/Sane.pm Wed Nov 26 20:16:39 2008
@@ -251,7 +251,7 @@
SANE_NAME_LAMP_OFF_AT_EXIT
);
-our $VERSION = '0.01';
+our $VERSION = '0.02';
our $DEBUG = 0;
our ($STATUS, $_status, $_vc);
@@ -338,13 +338,13 @@
# to read the image.
# For some reason, the #defines need parentheses here, but not normally
- if ($format == SANE_FRAME_RED() or $format == SANE_FRAME_GREEN() or
- $format == SANE_FRAME_BLUE() or $format == SANE_FRAME_RGB()) {
+ if ($format == Sane::SANE_FRAME_RED() or $format == Sane::SANE_FRAME_GREEN() or
+ $format == Sane::SANE_FRAME_BLUE() or $format == Sane::SANE_FRAME_RGB()) {
printf $fh "P6\n# SANE data follows\n%d %d\n%d\n", $width, $height,
($depth <= 8) ? 255 : 65535;
}
# For some reason, the #defines need parentheses here, but not normally
- elsif ($format == SANE_FRAME_GRAY()) {
+ elsif ($format == Sane::SANE_FRAME_GRAY()) {
if ($depth == 1) {
printf $fh "P4\n# SANE data follows\n%d %d\n", $width, $height;
}
@@ -408,7 +408,7 @@
=head2 Sane->get_version
-Returns a array with the SANE_VERSION_(MAJOR|MINOR|BUILD) versions:
+Returns an array with the SANE_VERSION_(MAJOR|MINOR|BUILD) versions:
join('.',Sane->get_version)
@@ -660,7 +660,7 @@
=head1 AUTHOR
-Jeffrey Ratcliffe, E<lt>Jeffrey.Ratcliffe at gmail.com<gt>
+Jeffrey Ratcliffe, E<lt>Jeffrey.Ratcliffe at gmail.comE<gt>
=head1 COPYRIGHT AND LICENSE
Modified: branches/upstream/libsane-perl/current/t/data.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/data.t?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/data.t (original)
+++ branches/upstream/libsane-perl/current/t/data.t Wed Nov 26 20:16:39 2008
@@ -5,13 +5,17 @@
# change 'tests => 1' to 'tests => last_test_to_print';
-use Test::More tests => 19;
+use Test::More tests => 17;
BEGIN { use_ok('Sane') };
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
+
+my @version = Sane->get_version;
+SKIP: {
+ skip "libsane 1.0.19 or better required", 18 unless $version[2] > 18;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
@@ -40,6 +44,9 @@
open my $fh, '>', $filename;
binmode $fh;
+ $test->write_pnm_header($fh, $param->{format}, $param->{pixels_per_line},
+ $param->{lines}, $param->{depth});
+
my ($data, $len);
do {
($data, $len) = $test->read ($param->{bytes_per_line});
@@ -52,6 +59,6 @@
$test->cancel;
close $fh;
- is (-s $filename, $param->{bytes_per_line}*$param->{lines}, 'image size');
}
}
+};
Modified: branches/upstream/libsane-perl/current/t/err.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/err.t?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/err.t (original)
+++ branches/upstream/libsane-perl/current/t/err.t Wed Nov 26 20:16:39 2008
@@ -12,6 +12,10 @@
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
+
+my @version = Sane->get_version;
+SKIP: {
+ skip "libsane 1.0.19 or better required", 37 unless $version[2] > 18;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
@@ -50,3 +54,4 @@
cmp_ok($Sane::STATUS, '==', $status{$_}, $_);
$test->cancel;
}
+};
Modified: branches/upstream/libsane-perl/current/t/non-blocking.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/non-blocking.t?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/non-blocking.t (original)
+++ branches/upstream/libsane-perl/current/t/non-blocking.t Wed Nov 26 20:16:39 2008
@@ -12,6 +12,10 @@
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
+
+my @version = Sane->get_version;
+SKIP: {
+ skip "libsane 1.0.19 or better required", 13 unless $version[2] > 18;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
@@ -64,3 +68,4 @@
close $fh;
is (-s $filename, $param->{bytes_per_line}*$param->{lines}, 'image size');
}
+};
Modified: branches/upstream/libsane-perl/current/t/options.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/options.t?rev=27314&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/options.t (original)
+++ branches/upstream/libsane-perl/current/t/options.t Wed Nov 26 20:16:39 2008
@@ -5,7 +5,7 @@
# change 'tests => 1' to 'tests => last_test_to_print';
-use Test::More tests => 137;
+use Test::More tests => 139;
BEGIN { use_ok('Sane') };
#########################
@@ -15,6 +15,10 @@
my @array = Sane->get_version;
is ($#array, 2, 'get_version');
+
+SKIP: {
+ skip "libsane 1.0.19 or better required", 135 unless $array[2] > 18;
+
@array = Sane->get_devices;
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'get_devices');
@@ -84,7 +88,11 @@
}
}
if (defined $in) {
- $info = $test->set_option($i, $in);
+ SKIP: {
+ skip 'Pressing buttons produces too much output', 1 unless $options->{type} != SANE_TYPE_BUTTON;
+
+ $info = $test->set_option($i, $in);
+ };
if ($options->{cap} & SANE_CAP_INACTIVE) {
cmp_ok($Sane::STATUS, '==', SANE_STATUS_INVAL, 'set_option');
}
@@ -115,3 +123,4 @@
}
}
}
+};
More information about the Pkg-perl-cvs-commits
mailing list