Revision: | 1.1 |
Committed: | Sat May 30 06:26:05 2009 UTC (15 years, 1 month ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
CVS Tags: | rel-4_0, rel-3_0, rel-4_01, rel-4_03, rel-4_02, rel-2_3, rel-4_0_00, rel-2_34, rel-2_32, rel-2_33, rel-2_31, rel-3_01, rel-3_02, rel-3_03, rel-3_04, rel-2_29, rel-2_28, rel-2_25, rel-2_24, rel-2_27, rel-2_26, HEAD |
Log Message: | 2.24 |
# | Content |
---|---|
1 | #! perl |
2 | |
3 | # adapted from a test by Martin Evans |
4 | |
5 | use strict; |
6 | use warnings; |
7 | |
8 | use JSON::XS; |
9 | |
10 | print "1..1\n"; |
11 | |
12 | my $data = ["\x{53f0}\x{6240}\x{306e}\x{6d41}\x{3057}", |
13 | "\x{6c60}\x{306e}\x{30ab}\x{30a8}\x{30eb}"]; |
14 | my $js = JSON::XS->new->encode ($data); |
15 | my $j = new JSON::XS; |
16 | my $object = $j->incr_parse ($js); |
17 | |
18 | die "no object" if !$object; |
19 | |
20 | eval { $j->incr_text }; |
21 | |
22 | print $@ ? "not " : "", "ok 1 # $@\n"; |
23 |