?????????? ????????? - ??????????????? - /home/agenciai/public_html/cd38d8/114_decode_prefix.t.tar
???????
home/.cpan/build/JSON-4.10-0/t/114_decode_prefix.t 0000644 00000001572 15127564541 0014714 0 ustar 00 use strict; use warnings; use Test::More tests => 8; BEGIN { $ENV{ PERL_JSON_BACKEND } = 0; } BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; } use JSON; my $json = JSON->new; my $complete_text = qq/{"foo":"bar"}/; my $garbaged_text = qq/{"foo":"bar"}\n/; my $garbaged_text2 = qq/{"foo":"bar"}\n\n/; my $garbaged_text3 = qq/{"foo":"bar"}\n----/; is( ( $json->decode_prefix( $complete_text ) ) [1], 13 ); is( ( $json->decode_prefix( $garbaged_text ) ) [1], 13 ); is( ( $json->decode_prefix( $garbaged_text2 ) ) [1], 13 ); is( ( $json->decode_prefix( $garbaged_text3 ) ) [1], 13 ); eval { $json->decode( "\n" ) }; ok( $@ =~ /malformed JSON/ ); eval { $json->allow_nonref(0)->decode('null') }; ok $@ =~ /allow_nonref/; eval { $json->decode_prefix( "\n" ) }; ok( $@ =~ /malformed JSON/ ); eval { $json->allow_nonref(0)->decode_prefix('null') }; ok $@ =~ /allow_nonref/;
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0 |
proxy
|
phpinfo
|
???????????