Show
Ignore:
Timestamp:
08/02/08 00:08:49 (5 years ago)
Author:
bonar
Message:

make registrant_code case-insensitive, fix some tests

Location:
lang/perl/Business-ISRC/trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Business-ISRC/trunk/README

    r16900 r16961  
    1515This module requires these other modules and libraries: 
    1616 
    17   Locale::Country 2.07 
     17  Locale::Country 
     18  Class::Accessor::Fast 
    1819 
    1920COPYRIGHT AND LICENCE 
  • lang/perl/Business-ISRC/trunk/lib/Business/ISRC.pm

    r16920 r16961  
    4141        raw_string       => $isrc_string, 
    4242        country_code     => uc($1), 
    43         registrant_code  => $2, 
     43        registrant_code  => uc($2), 
    4444        year             => $3, 
    4545        designation_code => $4, 
     
    135135  sample: US-L4Q-07-02458 
    136136 
    137   ISRC  (4) - prefix (omittable) 
    138   US    (2) - country code (ISO 3166-1-Alpha-2) 
    139   L4Q   (3) - registrant code 
    140   07    (2) - year (1980=>80, 2012=>12) 
    141   02458 (5) - designation code (track serial number) 
     137  name  letters desc 
     138  ------------------------------------- 
     139  ISRC  (4)   - prefix (omittable) 
     140  US    (2)   - country code (ISO 3166-1-Alpha-2) 
     141  L4Q   (3)   - registrant code. case insensitive. 
     142  07    (2)   - year (1980=>80, 2012=>12) 
     143  02458 (5)   - designation code, track serial number. 
    142144 
    143145=head1 ACCESSOR 
  • lang/perl/Business-ISRC/trunk/t/00_load.t

    r16920 r16961  
    44use warnings; 
    55 
    6 use Test::More qw/no_plan/; 
     6use Test::More tests => 3; 
    77 
    88BEGIN { 
    99    use_ok('Locale::Country'); 
    10     use_ok('Class::Accessor'); 
     10    use_ok('Class::Accessor::Fast'); 
    1111    use_ok('Business::ISRC'); 
    1212}; 
  • lang/perl/Business-ISRC/trunk/t/10_basic.t

    r16920 r16961  
    44use warnings; 
    55 
    6 use Test::More qw/no_plan/; 
     6use Test::More tests => 11; 
    77use Business::ISRC; 
    88 
  • lang/perl/Business-ISRC/trunk/t/11_overload.t

    r16920 r16961  
    44use warnings; 
    55 
    6 use Test::More qw/no_plan/; 
     6use Test::More tests => 4; 
    77use Business::ISRC; 
    88 
  • lang/perl/Business-ISRC/trunk/t/12_invalid.t

    r16920 r16961  
    44use warnings; 
    55 
    6 use Test::More qw/no_plan/; 
     6use Test::More tests => 8; 
    77use Business::ISRC; 
    88 
  • lang/perl/Business-ISRC/trunk/t/20_normalize.t

    r16920 r16961  
    44use warnings; 
    55 
    6 use Test::More qw/no_plan/; 
     6use Test::More tests => 16; 
    77use Business::ISRC; 
    88 
    99my @isrc_string = qw/ 
    1010    ISRC-JP-I4Q-07-00001 
     11    ISRC-JP-i4q-07-00001 
     12    ISRC-jp-i4q-07-00001 
    1113    ISRCJPI4Q0700001 
    1214    JP-I4Q-07-00001 
  • lang/perl/Business-ISRC/trunk/t/50_random.t

    r16920 r16961  
    55 
    66use Test::More tests => 2000; 
     7 
     8use Locale::Country qw/all_country_codes/; 
    79use Business::ISRC; 
    810 
    911# only officially assigned code 
    10 my @country_code = qw/ 
    11 AD AE AF AG AI AL AM AN AO AQ Co AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BM BN BO BR BS BT BV BW BY Co BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CX CY CZ DE Co DJ DK DM DO DZ EC EE EG EH Co ER ES Co ET FI FJ FK FM FO FR GA GB GD GE GF GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IN IO IQ IR IS IT JM JO JP KE KG KH Co KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD MG MH MK Co ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR ST SV SY SZ TC TD TF Co TG TH TJ TK TL TM TN TO TR TT TV TW De TZ UA UG UM US UY UZ VA Pr VC VE VG VI VN VU WF WS YE YT ZA ZM ZW 
    12 /; 
    13 # GG ME IM MF JE BL RS UK 
    14  
     12my @country_code = map { uc($_) } all_country_codes(); 
    1513my @registrant = qw/ 
    1614a b c d e f g h i j k l m n o p q r s t u