r15435 - in /branches/upstream/libi18n-charset-perl/current: META.yml	lib/I18N/Charset.pm t/libi.t t/rt33087.t t/utf8.t
    gregoa-guest at users.alioth.debian.org 
    gregoa-guest at users.alioth.debian.org
       
    Fri Feb 22 21:13:07 UTC 2008
    
    
  
Author: gregoa-guest
Date: Fri Feb 22 21:13:06 2008
New Revision: 15435
URL: http://svn.debian.org/wsvn/?sc=1&rev=15435
Log:
[svn-upgrade] Integrating new upstream version, libi18n-charset-perl (1.388)
Modified:
    branches/upstream/libi18n-charset-perl/current/META.yml
    branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm
    branches/upstream/libi18n-charset-perl/current/t/libi.t
    branches/upstream/libi18n-charset-perl/current/t/rt33087.t
    branches/upstream/libi18n-charset-perl/current/t/utf8.t
Modified: branches/upstream/libi18n-charset-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/META.yml?rev=15435&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/META.yml (original)
+++ branches/upstream/libi18n-charset-perl/current/META.yml Fri Feb 22 21:13:06 2008
@@ -27,4 +27,4 @@
 requires: 
   IO::String: 0
   perl: 5.004
-version: 1.387
+version: 1.388
Modified: branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm?rev=15435&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm Fri Feb 22 21:13:06 2008
@@ -1,5 +1,5 @@
 
-# $rcs = ' $Id: Charset.pm,v 1.387 2008/02/16 18:59:04 Daddy Exp $ ' ;
+# $rcs = ' $Id: Charset.pm,v 1.388 2008/02/21 03:30:55 Daddy Exp $ ' ;
 
 package I18N::Charset;
 
@@ -69,7 +69,7 @@
 #	Public Global Variables
 #-----------------------------------------------------------------------
 our
-$VERSION = do { my @r = (q$Revision: 1.387 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.388 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
 our @EXPORT = qw( iana_charset_name
 map8_charset_name
 umap_charset_name
@@ -866,7 +866,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 1998-2006 Martin Thurn
+Copyright (c) 1998-2008 Martin Thurn
 
 This module is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
@@ -886,8 +886,7 @@
 
 # The only reason this is a while loop is so that I can bail out
 # (e.g. for debugging) without using goto ;-)
-INFINITE:
-while (1)
+INITIALIZATION:
   {
   my ($sName, $iMIB, $sAlias, $mimename);
   my $iDebug = 0;
@@ -954,7 +953,7 @@
       } # if Alias
     } # while <$io>
 
-  # last INFINITE;
+  # last;  # for debugging
 
   # Not that we have all the standard definitions, process the special
   # === directives:
@@ -984,7 +983,7 @@
       } # foreach
     } # foreach
 
-  # last INFINITE;
+  # last;  # for debugging
 
   if (eval "require Unicode::Map8")
     {
@@ -1085,7 +1084,7 @@
     print STDERR "done.\n" if $iDebug;
     } # if Unicode::Map8 installed
 
-  # last INFINITE;
+  # last;  # for debugging
 
   # $iDebug = 1;
   if (eval "require Unicode::Map")
@@ -1207,8 +1206,8 @@
     print STDERR "done.\n" if $iDebug;
     } # if Unicode::MapUTF8 installed
 
-  last INFINITE;
-
+  # Initialization is all finished:
+  last;
   # Below here is debugging code:
 
   print STDERR " + the following IANA names do *not* have entries in the Map8 table:\n";
@@ -1220,7 +1219,7 @@
     $hiTried{$sIANA}++;
     } # foreach
 
-  # last INFINITE;
+  # last;  # for debugging
 
   # debugging: selective dump:
   print STDERR " + after init, iana_charset_name returns:\n";
@@ -1237,7 +1236,7 @@
     print STDERR " +   $key => ", &map8_charset_name($key) || 'undef', "\n";
     } # foreach
 
-  last INFINITE;
+  last;
 
   # debugging: huge dump:
   # &_dump_hash('hsLongnameOfMIB', \%hsLongnameOfMIB);
@@ -1248,8 +1247,7 @@
     print STDERR " + _short_to_long($_) == ", &_short_to_long($_) || 'undef', "\n";
     } # foreach
 
-  last INFINITE;
-  } # while
+  } # end of INITIALIZATION block
 
 sub _dump_hash
   {
Modified: branches/upstream/libi18n-charset-perl/current/t/libi.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/libi.t?rev=15435&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/libi.t (original)
+++ branches/upstream/libi18n-charset-perl/current/t/libi.t Fri Feb 22 21:13:06 2008
@@ -1,6 +1,6 @@
 # libi.t - tests for "preferred LIBI name" functionality of I18N::Charset
 
-# $Id: libi.t,v 1.10 2005/11/12 14:45:08 Daddy Exp $
+# $Id: libi.t,v 1.11 2008/02/21 03:30:13 Daddy Exp $
 
 use Test::More no_plan;
 
Modified: branches/upstream/libi18n-charset-perl/current/t/rt33087.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/rt33087.t?rev=15435&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/rt33087.t (original)
+++ branches/upstream/libi18n-charset-perl/current/t/rt33087.t Fri Feb 22 21:13:06 2008
@@ -1,5 +1,5 @@
 
-# $Id: rt33087.t,v 1.1 2008/02/15 23:16:45 Daddy Exp $
+# $Id: rt33087.t,v 1.2 2008/02/21 03:10:38 Daddy Exp $
 
 use blib;
 use Test::More;
@@ -7,7 +7,7 @@
   {
   plan skip_all => 'Unicode::Map8 is not installed';
   } # unless
-plan tests => 2;
+plan tests => 3;
 &use_ok('I18N::Charset', qw( iana_charset_name map8_charset_name ));
 
 is(iana_charset_name("koi8-r"), 'KOI8-R', 'iana literal koi8-r');
Modified: branches/upstream/libi18n-charset-perl/current/t/utf8.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/utf8.t?rev=15435&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/utf8.t (original)
+++ branches/upstream/libi18n-charset-perl/current/t/utf8.t Fri Feb 22 21:13:06 2008
@@ -1,76 +1,65 @@
-# $Revision: 1.7 $
-# utf8.t - tests for Unicode::MapUTF8 functionality of I18N::Charset
-
-use Test::More no_plan;
-
-use strict;
-
-BEGIN { use_ok('I18N::Charset') };
-
-# These should fail gracefully:
-my @aa;
-ok(!defined umu8_charset_name(), '');         # no argument
-ok(!defined umu8_charset_name(undef), '');    # undef argument
-ok(!defined umu8_charset_name(""), '');       # empty argument
-ok(!defined umu8_charset_name("junk"), '');   # illegal code
-ok(!defined umu8_charset_name(\@aa), '');     # illegal argument
-
-SKIP:
-  {
-  skip 'Unicode::MapUTF8 is not installed', 16 unless eval "require Unicode::MapUTF8";
-
- SKIP:
-    {
-    skip 'Unicode::MapUTF8 version is too old (1.09 is good)', 16 unless eval '(1.08 < ($Unicode::MapUTF8::VERSION || 0))';
-
-    # Plain old IANA names:
-    ok(umu8_charset_name("Unicode-2-0-utf-8") eq "utf8", 'Unicode-2-0-utf-8');
-    ok(umu8_charset_name("UCS-2") eq "ucs2", 'UCS-2');
-    ok(umu8_charset_name("U.C.S. 4") eq "ucs4", 'U.C.S. 4');
- SKIP:
-      {
-      skip 'Unicode::Map is not installed', 2 unless eval 'require Unicode::Map';
-      # Unicode::Map aliases:
-      # Unicode::Map names with dummy mib:
-      ok(umu8_charset_name("Adobe Ding Bats") eq "ADOBE-DINGBATS", 'Adobe Ding Bats');
-      ok(umu8_charset_name("M.S. Turkish") eq "MS-TURKISH", 'M.S. Turkish');
-      } # SKIP block for Unicode::Map8 module
- SKIP:
-      {
-      skip 'Unicode::Map8 is not installed', 7 unless eval 'require Unicode::Map8';
-      # Unicode::Map8 aliases:
-      ok(umu8_charset_name("Windows-1-2-5-1") eq "cp1251", 'windows-1-2-5-1');
-      ok(umu8_charset_name("windows-1252") eq "cp1252", 'windows-1252 eq');
-      ok(umu8_charset_name("win-latin-1") eq "cp1252", 'win-latin-1');
-      ok(umu8_charset_name("windows-1252") ne "cp1253", 'windows-1252 ne');
-      ok(umu8_charset_name("windows-1253") eq "cp1253", 'windows-1253');
-      # Unicode::Map8 names with dummy mib:
-      ok(umu8_charset_name("Adobe Zapf Ding Bats") eq "Adobe-Zapf-Dingbats", 'Adobe Zapf Ding Bats');
-      ok(umu8_charset_name(" c p 1 0 0 7 9 ") eq "cp10079", ' c p 1 0 0 7 9 ');
-      } # SKIP block for Unicode::Map8 module
- SKIP:
-      {
-      skip 'Jcode is not installed', 4 unless eval 'require Jcode';
-      ok(umu8_charset_name("Shift_JIS") eq "sjis", 'Shift_JIS');
-      ok(umu8_charset_name("sjis") eq "sjis", 'sjis');
-      ok(umu8_charset_name("x-sjis") eq "sjis", 'x-sjis');
-      ok(umu8_charset_name("x-x-sjis") eq "sjis", 'x-x-sjis');
-      } # SKIP block for Jcode module
-    } # SKIP block for VERSION of Unicode::MapUTF8 module
-  } # SKIP block for existence of Unicode::MapUTF8 module
-
-exit 0;
-
-my @as = &Unicode::MapUTF8::utf8_supported_charset();
-my @TESTS = map { 'defined iana_charset_name("'. $_ .'")' } @as;
-
-plan tests => scalar(@TESTS);
-
-foreach (@TESTS)
-  {
-  ok($_);
-  } # foreach
-
-exit 0;
-
-__END__
+# $Id: utf8.t,v 1.10 2008/02/21 03:33:06 Daddy Exp $
+# utf8.t - tests for Unicode::MapUTF8 functionality of I18N::Charset
+
+use strict;
+
+use Test::More 'no_plan';
+
+BEGIN { use_ok('I18N::Charset') };
+
+# These should fail gracefully:
+my @aa;
+ok(!defined umu8_charset_name(), q{});         # no argument
+ok(!defined umu8_charset_name(undef), q{});    # undef argument
+ok(!defined umu8_charset_name(q{}), q{});      # empty argument
+ok(!defined umu8_charset_name('junk'), q{});   # illegal code
+ok(!defined umu8_charset_name(\@aa), q{});     # illegal argument
+
+SKIP:
+  {
+  skip 'Unicode::MapUTF8 is not installed', 16 unless eval 'require Unicode::MapUTF8';
+
+ SKIP:
+    {
+    skip 'Unicode::MapUTF8 version is too old (1.09 is good)', 16 unless eval '(1.08 < ($Unicode::MapUTF8::VERSION || 0))';
+
+    # Plain old IANA names:
+    is(umu8_charset_name('Unicode-2-0-utf-8'), 'utf8', 'Unicode-2-0-utf-8');
+    is(umu8_charset_name('UCS-2'), 'ucs2', 'UCS-2');
+    is(umu8_charset_name('U.C.S. 4'), 'ucs4', 'U.C.S. 4');
+ SKIP:
+      {
+      skip 'Unicode::Map is not installed', 2 unless eval 'require Unicode::Map';
+      # Unicode::Map aliases:
+      # Unicode::Map names with dummy mib:
+      is(umu8_charset_name('Adobe Ding Bats'), 'ADOBE-DINGBATS', 'Adobe Ding Bats');
+      is(umu8_charset_name('M.S. Turkish'), 'MS-TURKISH', 'M.S. Turkish');
+      } # SKIP block for Unicode::Map8 module
+ SKIP:
+      {
+      skip 'Unicode::Map8 is not installed', 7 unless eval 'require Unicode::Map8';
+      # Unicode::Map8 aliases:
+      is(umu8_charset_name('Windows-1-2-5-1'), 'cp1251', 'windows-1-2-5-1');
+      is(umu8_charset_name('windows-1252'), 'cp1252', 'windows-1252 eq');
+      is(umu8_charset_name('win-latin-1'), 'cp1252', 'win-latin-1');
+      isnt(umu8_charset_name('windows-1252'), 'cp1253', 'windows-1252 ne');
+      is(umu8_charset_name('windows-1253'), 'cp1253', 'windows-1253');
+      # Unicode::Map8 names with dummy mib:
+      is(umu8_charset_name('Adobe Zapf Ding Bats'), 'Adobe-Zapf-Dingbats', 'Adobe Zapf Ding Bats');
+      is(umu8_charset_name(' c p 1 0 0 7 9 '), 'cp10079', ' c p 1 0 0 7 9 ');
+      } # SKIP block for Unicode::Map8 module
+ SKIP:
+      {
+      skip 'Jcode is not installed', 4 unless eval 'require Jcode';
+      is(umu8_charset_name('Shift_JIS'), 'sjis', 'Shift_JIS');
+      is(umu8_charset_name('sjis'), 'sjis', 'sjis');
+      is(umu8_charset_name('x-sjis'), 'sjis', 'x-sjis');
+      is(umu8_charset_name('x-x-sjis'), 'sjis', 'x-x-sjis');
+      } # SKIP block for Jcode module
+    } # SKIP block for VERSION of Unicode::MapUTF8 module
+  } # SKIP block for existence of Unicode::MapUTF8 module
+
+exit 0;
+
+__END__
+
    
    
More information about the Pkg-perl-cvs-commits
mailing list