You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2004/04/22 06:18:16 UTC
svn commit: rev 10163 - incubator/spamassassin/trunk/t
Author: sidney
Date: Wed Apr 21 21:18:14 2004
New Revision: 10163
Modified:
incubator/spamassassin/trunk/t/sha1.t
Log:
Change sha1.t test to match changed function names in SHA1.pm
Modified: incubator/spamassassin/trunk/t/sha1.t
==============================================================================
--- incubator/spamassassin/trunk/t/sha1.t (original)
+++ incubator/spamassassin/trunk/t/sha1.t Wed Apr 21 21:18:14 2004
@@ -28,7 +28,7 @@
my ($data, $want) = @_;
# test our pure perl code
- my $perl_sha1 = unpack("H*", Mail::SpamAssassin::SHA1::SHA1($data));
+ my $perl_sha1 = unpack("H*", Mail::SpamAssassin::SHA1::perl_sha1($data));
# test the fast version if we have it
my $digest_sha1;
@@ -37,26 +37,26 @@
}
# test as it is going to be used by SpamAssassin, including hex conversion
- my $sa_sha1 = Mail::SpamAssassin::SHA1::sha1($data);
+ my $sa_sha1_hex = Mail::SpamAssassin::SHA1::sha1_hex($data);
# and just to be really careful explicitly test sha1bin too
- my $sa_sha1bin = unpack("H*", Mail::SpamAssassin::SHA1::sha1bin($data));
+ my $sa_sha1 = unpack("H*", Mail::SpamAssassin::SHA1::sha1($data));
my $failure = 0;
if ($want ne $perl_sha1) {
- print "Mail::SpamAssassin::SHA1:SHA1 mismatch\n";
+ print "Mail::SpamAssassin::SHA1:perl_sha1 mismatch\n";
$failure++;
}
if (HAS_DIGEST_SHA1 && $want ne $digest_sha1) {
print "Digest::SHA1 mismatch\n";
$failure++;
}
- if ($want ne $sa_sha1) {
- print "Mail::SpamAssassin::SHA1::sha1 mismatch\n";
+ if ($want ne $sa_sha1_hex) {
+ print "Mail::SpamAssassin::SHA1::sha1_hex mismatch\n";
$failure++;
}
- if ($want ne $sa_sha1bin) {
- print "Mail::SpamAssassin::SHA1::sha1bin mismatch\n";
+ if ($want ne $sa_sha1) {
+ print "Mail::SpamAssassin::SHA1::sha1 mismatch\n";
$failure++;
}
return ! $failure;
Re: svn commit: rev 10163 - incubator/spamassassin/trunk/t
Posted by Daniel Quinlan <qu...@pathname.com>.
Sorry about that. I forgot to do a check-in of "." instead of "lib".
:-)
I also did a quick check on a PPC machine and the big-endian ordering
appears to be correct for the binary version too. I didn't do a full
"make test" since web access is blocked on this machine and "svn" isn't
installed (so, I did a uuencode/uudecode of a gzipped SHA1.pm file, talk
about brain-damaged policies with no real benefit).
Daniel
--
Daniel Quinlan anti-spam (SpamAssassin), Linux,
http://www.pathname.com/~quinlan/ and open source consulting