r9077 - in /branches/upstream/libjson-any-perl/current: Changes META.yml lib/JSON/Any.pm t/10_unicode.t
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Fri Nov 9 15:46:23 UTC 2007
Author: gregoa-guest
Date: Fri Nov 9 15:46:22 2007
New Revision: 9077
URL: http://svn.debian.org/wsvn/?sc=1&rev=9077
Log:
[svn-upgrade] Integrating new upstream version, libjson-any-perl (1.13)
Modified:
branches/upstream/libjson-any-perl/current/Changes
branches/upstream/libjson-any-perl/current/META.yml
branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm
branches/upstream/libjson-any-perl/current/t/10_unicode.t
Modified: branches/upstream/libjson-any-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/Changes?rev=9077&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/Changes (original)
+++ branches/upstream/libjson-any-perl/current/Changes Fri Nov 9 15:46:22 2007
@@ -1,4 +1,7 @@
Revision history for JSON-Any
+1.13 2007-11-06
+ * Fix 10_unicode.t to skip_all if no supported unicode backend is found
+ (reported by Andreas König)
1.12 2007-10-22
* Fix issue with 05-JSON-Syck.t so we can pass our tests again
Modified: branches/upstream/libjson-any-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/META.yml?rev=9077&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/META.yml (original)
+++ branches/upstream/libjson-any-perl/current/META.yml Fri Nov 9 15:46:22 2007
@@ -17,4 +17,4 @@
- t
requires:
Carp: 0
-version: 1.12
+version: 1.13
Modified: branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm?rev=9077&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm (original)
+++ branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm Fri Nov 9 15:46:22 2007
@@ -1,6 +1,6 @@
##############################################################################
# JSON::Any
-# v1.12
+# v1.13
# Copyright (c) 2007 Chris Thompson
##############################################################################
@@ -16,11 +16,11 @@
=head1 VERSION
-Version 1.12
-
-=cut
-
-our $VERSION = '1.12';
+Version 1.13
+
+=cut
+
+our $VERSION = '1.13';
our $UTF8;
Modified: branches/upstream/libjson-any-perl/current/t/10_unicode.t
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/t/10_unicode.t?rev=9077&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/t/10_unicode.t (original)
+++ branches/upstream/libjson-any-perl/current/t/10_unicode.t Fri Nov 9 15:46:22 2007
@@ -2,7 +2,7 @@
$|++;
use strict;
use utf8;
-use Test::More 'no_plan';
+use Test::More;
use JSON::Any;
@@ -14,20 +14,24 @@
JSON::Any->new;
};
- diag $@ and next if $@;
+ diag "$backend: " . $@ and next if $@;
$j and $j->handler or next;
- diag "handler is " . (ref($j->handler) || $j->handlerType);
+ diag "handler is " . ( ref( $j->handler ) || $j->handlerType );
+
+ plan 'no_plan' unless $ENV{JSON_ANY_RAN_TESTS};
+ $ENV{JSON_ANY_RAN_TESTS} = 1;
foreach my $text qw(foo ש×××) {
- my $struct = [ $text ];
+ my $struct = [$text];
- my $frozen = $j->encode( $struct );
- my $thawed = $j->decode( $frozen );
+ my $frozen = $j->encode($struct);
+ my $thawed = $j->decode($frozen);
- ok( utf8::is_utf8($frozen) || !scalar($frozen !~ /[\w\d[:punct:]]/), "json output is utf8");
+ ok( utf8::is_utf8($frozen) || !scalar( $frozen !~ /[\w\d[:punct:]]/ ),
+ "json output is utf8" );
is_deeply( $thawed, $struct, "deeply" );
@@ -36,15 +40,16 @@
my $d = Devel::StringInfo->new;
$d->dump_info( $text, name => "expected" );
$d->dump_info( $thawed->[0], name => "got" );
- $d->dump_info( $frozen );
+ $d->dump_info($frozen);
};
- ok( utf8::is_utf8($thawed->[0]) || !scalar($text !~ /[a-z]/), "text is utf8 if it needs to be" );
+ ok( utf8::is_utf8( $thawed->[0] ) || !scalar( $text !~ /[a-z]/ ),
+ "text is utf8 if it needs to be" );
- if ( utf8::valid($frozen) ) {
+ if ( utf8::valid($frozen) ) {
utf8::decode($frozen);
- my $thawed = $j->decode( $frozen );
+ my $thawed = $j->decode($frozen);
is_deeply( $thawed, $struct, "deeply" );
@@ -53,11 +58,14 @@
my $d = Devel::StringInfo->new;
$d->dump_info( $text, name => "expected" );
$d->dump_info( $thawed->[0], name => "got" );
- $d->dump_info( $frozen );
+ $d->dump_info($frozen);
};
- ok( utf8::is_utf8($thawed->[0]) || !scalar($text !~ /[a-z]/), "text is utf8 if it needs to be" );
+ ok( utf8::is_utf8( $thawed->[0] ) || !scalar( $text !~ /[a-z]/ ),
+ "text is utf8 if it needs to be" );
}
}
}
+plan skip_all => 'no JSON package with unicode support installed'
+ unless $ENV{JSON_ANY_RAN_TESTS};
More information about the Pkg-perl-cvs-commits
mailing list