#
# Copyright: 2010 - Equinox Software, Inc.
# Author: Joe Atzberger
+# Copyright: 2011 - Dan Scott <dscott@laurentian.ca>
# License: GPLv2 or later
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More tests => 39;
use vars qw/ $debug /;
note("checksum: " . checksum("9300CNLoginUserID|COLoginPassword|CPLocationCode|AY5AZEC78"));
my %pairs = (
- FCB4 => '990 402.00AY1AZ', # see page 26 of the 3M SIP2 Developers Guide
- EC78 => '9300CNLoginUserID|COLoginPassword|CPLocationCode|AY5AZ',
- F400 => '2300119960212 100239AOid_21|104000000105|AC|AD|AY2AZ',
- CBC8 => '18030001200808050000053612CF 0|AB2030527770|AJWalter in the woods and the letter W / by Cynthia Klingel and Robert B. Noyed.|BG|BV|CK000|AQreerd|CH|AF|CSE KLINGEL | CT|AY9AZ',
- CD15 => '101YNN2008050000053612AOkcls |AB2030527770|AQreerd|AJWalter in the woods and the letter W / by Cynthia Klingel and Robert B. Noyed.|AF|CSE KLINGEL|CRreerd|AY89AZ',
- DC06 => '101YNN200808050000053558AOkcls |AB2029693658|AQrecfc|AJClementine and Mungo / by Saray Dyer.|AF|CSE DYER|CRrecfc|AY1AZ',
+ DB4E => "1804020120110630 110249AB30007008637257|AJVie d'Isabelle Eberhardt |CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP EAU|AY6AZ",
+ DCF8 => '1804020120110630 110249AB30007008503046|AJLe Piège de Bogota|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP DAL|AY7AZ',
+ D852 => '1804020120110630 110249AB30007008317298|AJUne épouse presque parfaite! |CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP COL|AY8AZ',
+ D050 => "1804020120110630 110249AB30007008644659|AJLe diable de Blind River : une enquête d'Alex McKnight|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP HAM|AY9AZ",
+ D99C => '1804020120110630 110249AB30007008641556|AJLa sorcière de Portobello|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP COE|AY0AZ',
+ CD67 => '1804020120110630 110249AB30007007632515|AJMeurtre à Canton : (les dernières enquêtes du juge Ti)|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GUL|AY1AZ',
+ D9CF => "1804020120110630 110250AB30007001211936|AJL' Énigme du clou chinois|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GUL|AY2AZ",
+ DBA5 => '1804020120110630 110250AB30007007632564|AJAssassins et poètes|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GUL|AY3AZ',
+ DC23 => "1804020120110630 110250AB30007008611161|AJUne vie n'est pas assez|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GRO|AY4AZ",
+ DA50 => '1804020120110630 110250AB30007008317199|AJLa touche étoile : roman|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GRO|AY5AZ',
+ CE34 => '1804020120110630 110250AB30007008619875|AJLe troisième homme suivi de Première désillusion|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GRE|AY6AZ',
+ E174 => '1804020120110630 110250AB30007008641424|AJLe zahir|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP COE|AY7AZ',
+ E003 => '1804020120110630 110251AB30007008432675|AJIncendiaire|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP CLE|AY8AZ',
+ DB4F => "1804020120110630 110251AB30007001210029|AJLa Mort n'est pas une fin|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP CHR|AY9AZ",
+ DAE9 => "1804020120110630 110251AB30007008637232|AJL'E mpire des loups : roman|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP GRA|AY0AZ",
+ DD80 => '1804020120110630 110251AB30007001210078|AJLe Miroir se brisa|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP CHR|AY1AZ',
+ D0EC => '1804020120110630 110251AB30007001210128|AJTémoin à charge : huit nouvelles inédites|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-28 23:59:59|CSPB LP CHR|AY2AZ',
+ DB71 => '1804020120110630 110251AB30007008637216|AJLa nuit du renard : roman|CK001|AQOSUL|APOSUL|BGOSUL|AH2011-10-18 23:59:59|CSPB LP CLA|AY3AZ',
FDFD => '941AY0AZ', # example from CASSIE
);
foreach (sort keys %pairs) {
my $string = $pairs{$_};
my $checksum = checksum($string);
- is($checksum, $_, "checksum($string)");
+ is($checksum, $_, "checksum($string");
ok(verify_cksum("$string$_"), "verify_cksum($string$_)");
}
# is();