r8724 - in /trunk/libdigest-crc-perl: Changes META.yml debian/changelog lib/Digest/CRC.pm t/crc.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Thu Nov 1 11:14:53 UTC 2007
Author: gregoa-guest
Date: Thu Nov 1 11:14:53 2007
New Revision: 8724
URL: http://svn.debian.org/wsvn/?sc=1&rev=8724
Log:
New upstream release.
Modified:
trunk/libdigest-crc-perl/Changes
trunk/libdigest-crc-perl/META.yml
trunk/libdigest-crc-perl/debian/changelog
trunk/libdigest-crc-perl/lib/Digest/CRC.pm
trunk/libdigest-crc-perl/t/crc.t
Modified: trunk/libdigest-crc-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libdigest-crc-perl/Changes?rev=8724&op=diff
==============================================================================
--- trunk/libdigest-crc-perl/Changes (original)
+++ trunk/libdigest-crc-perl/Changes Thu Nov 1 11:14:53 2007
@@ -28,3 +28,6 @@
0.10 Sat Mar 18 21:07:22 2004
- adapted behaviour to Digest
+0.11 Wed Oct 31 20:26:13 2007
+ - fixed __reflect error
+
Modified: trunk/libdigest-crc-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libdigest-crc-perl/META.yml?rev=8724&op=diff
==============================================================================
--- trunk/libdigest-crc-perl/META.yml (original)
+++ trunk/libdigest-crc-perl/META.yml Thu Nov 1 11:14:53 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Digest-CRC
-version: 0.10
+version: 0.11
version_from: lib/Digest/CRC.pm
installdirs: site
requires:
Modified: trunk/libdigest-crc-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libdigest-crc-perl/debian/changelog?rev=8724&op=diff
==============================================================================
--- trunk/libdigest-crc-perl/debian/changelog (original)
+++ trunk/libdigest-crc-perl/debian/changelog Thu Nov 1 11:14:53 2007
@@ -1,10 +1,11 @@
-libdigest-crc-perl (0.10-2) UNRELEASED; urgency=low
+libdigest-crc-perl (0.11-1) UNRELEASED; urgency=low
+ * New upstream release.
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
field (source stanza); Homepage field (source stanza). Removed: XS-
Vcs-Svn fields.
- -- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 09 Oct 2007 22:28:59 +0200
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Thu, 01 Nov 2007 12:14:03 +0100
libdigest-crc-perl (0.10-1) unstable; urgency=low
Modified: trunk/libdigest-crc-perl/lib/Digest/CRC.pm
URL: http://svn.debian.org/wsvn/trunk/libdigest-crc-perl/lib/Digest/CRC.pm?rev=8724&op=diff
==============================================================================
--- trunk/libdigest-crc-perl/lib/Digest/CRC.pm (original)
+++ trunk/libdigest-crc-perl/lib/Digest/CRC.pm Thu Nov 1 11:14:53 2007
@@ -16,7 +16,7 @@
crc32_hex crc32_base64
);
-$VERSION = '0.10';
+$VERSION = '0.11';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -76,7 +76,8 @@
}
}
}
- push @crctab, $r&2**$width-1;
+ my $x=$r&2**$width-1;
+ push @crctab, $x;
}
\@crctab;
}
@@ -88,6 +89,7 @@
my $pos = -length $message;
my $mask = 2**$width-1;
while ($pos) {
+ prinddt "pos=$pos\n";
if ($refin) {
$crc = ($crc>>8)^$tab->[($crc^ord(substr($message, $pos++, 1)))&0xff]
} else {
@@ -96,7 +98,6 @@
}
if ($refout^$refin) {
- print STDERR "refout\n";
$crc = _reflect($crc,$width);
}
Modified: trunk/libdigest-crc-perl/t/crc.t
URL: http://svn.debian.org/wsvn/trunk/libdigest-crc-perl/t/crc.t?rev=8724&op=diff
==============================================================================
--- trunk/libdigest-crc-perl/t/crc.t (original)
+++ trunk/libdigest-crc-perl/t/crc.t Thu Nov 1 11:14:53 2007
@@ -1,5 +1,5 @@
BEGIN {
- $tests = 18;
+ $tests = 20;
$| = 1;
eval "use Test::More tests => $tests";
@@ -25,27 +25,37 @@
my ($crc32,$crc16,$crcccitt,$crc8) = (crc32($input),crc16($input),crcccitt($input),crc8($input));
ok($crc32 == 3421780262, 'crc32');
+$crc32=$crc32^0xffffffff;
+ok(crc32($input.join('',
+ map {chr(($crc32>>(8*$_))&0xff)} (0,1,2,3))) == 0xffffffff,
+ 'crc32 Nulltest');
ok($crcccitt == 10673, 'crcccitt');
ok($crc16 == 47933, 'crc16');
ok($crc8 == 244, 'crc8');
+ok(($crc8=crc8($input.chr($crc8))) == 0, 'crc8 Nulltest');
my $ctx; $ctx = Digest::CRC->new();
$ctx->add($input);
ok($ctx->digest == 3421780262, 'OO crc32');
+$crc32=$crc32^0xffffffff;
+
+
# addfile
-open(F,"<Changes")||die "Cannot open Changes";
+open(F,"<README")||die "Cannot open Changes";
$ctx->addfile(F);
close(F);
-ok($ctx->digest == 83730842, 'OO crc32 with addfile');
+my $y = $ctx->digest;
+ok($y == 1468974098, 'OO crc32 with addfile '.$y);
# start at offset >0 with previous checksum result
-$ctx = Digest::CRC->new(type=>"crc32",cont=>1,init=>1901368946);
-open(F,"<Changes")||die "Cannot open Changes";
+$ctx = Digest::CRC->new(type=>"crc32",cont=>1,init=>2583869373);
+open(F,"<README")||die "Cannot open README";
use Fcntl qw(:seek);
-seek(F,536,Fcntl::SEEK_SET);
+seek(F,989,Fcntl::SEEK_SET);
$ctx->addfile(F);
close(F);
-ok($ctx->digest == 3281456132, 'OO crc32 with addfile');
+$y = $ctx->digest;
+ok($y == 1468974098, 'OO crc32 with addfile '.$y);
$ctx = Digest::CRC->new(type=>"crcccitt");
$ctx->add($input);
More information about the Pkg-perl-cvs-commits
mailing list