Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
cpan /
JSON-PP /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
000_load.t
159
B
-r--r--r--
2014-12-27 11:48
001_utf8.t
1.11
KB
-r--r--r--
2014-12-27 11:48
002_error.t
2.54
KB
-r--r--r--
2014-12-27 11:48
003_types.t
2.26
KB
-r--r--r--
2014-12-27 11:48
006_pc_pretty.t
1.28
KB
-r--r--r--
2014-12-27 11:48
007_pc_esc.t
2.02
KB
-r--r--r--
2014-12-27 11:48
008_pc_base.t
2.1
KB
-r--r--r--
2014-12-27 11:48
009_pc_extra_number.t
752
B
-r--r--r--
2014-12-27 11:48
010_pc_keysort.t
473
B
-r--r--r--
2014-12-27 11:48
011_pc_expo.t
1.06
KB
-r--r--r--
2014-12-27 11:48
012_blessed.t
1.46
KB
-r--r--r--
2014-12-27 11:48
013_limit.t
855
B
-r--r--r--
2014-12-27 11:48
014_latin1.t
652
B
-r--r--r--
2014-12-27 11:48
015_prefix.t
459
B
-r--r--r--
2014-12-27 11:48
016_tied.t
387
B
-r--r--r--
2014-12-27 11:48
017_relaxed.t
710
B
-r--r--r--
2014-12-27 11:48
018_json_checker.t
3.83
KB
-r--r--r--
2014-12-27 11:48
019_incr.t
5.05
KB
-r--r--r--
2014-12-27 11:48
020_unknown.t
1.03
KB
-r--r--r--
2014-12-27 11:48
021_evans_bugrep.t
831
B
-r--r--r--
2014-12-27 11:48
022_comment_at_eof.t
1.36
KB
-r--r--r--
2014-12-27 11:48
099_binary.t
1.65
KB
-r--r--r--
2014-12-27 11:48
104_sortby.t
656
B
-r--r--r--
2014-12-27 11:48
105_esc_slash.t
285
B
-r--r--r--
2014-12-27 11:48
106_allow_barekey.t
362
B
-r--r--r--
2014-12-27 11:48
107_allow_singlequote.t
486
B
-r--r--r--
2014-12-27 11:48
108_decode.t
776
B
-r--r--r--
2014-12-27 11:48
109_encode.t
833
B
-r--r--r--
2014-12-27 11:48
110_bignum.t
852
B
-r--r--r--
2014-12-27 11:48
112_upgrade.t
583
B
-r--r--r--
2014-12-27 11:48
113_overloaded_eq.t
946
B
-r--r--r--
2014-12-27 11:48
114_decode_prefix.t
808
B
-r--r--r--
2014-12-27 11:48
115_tie_ixhash.t
729
B
-r--r--r--
2014-12-27 11:48
116_incr_parse_fixed.t
408
B
-r--r--r--
2014-12-27 11:48
_unicode_handling.pm
477
B
-r--r--r--
2014-12-27 11:48
Save
Rename
#!/usr/bin/perl -w # copied over from JSON::PP::XS and modified to use JSON::PP use strict; use Test::More; BEGIN { plan tests => 697 }; BEGIN { $ENV{PERL_JSON_BACKEND} = 0; } use JSON::PP; if ( $] >= 5.006 ) { eval <<'TEST' or die "Failed to eval test code for version $]: $@"; sub splitter { my ($coder, $text) = @_; $coder->canonical(1) if $] >= 5.017009; for (0 .. length $text) { my $a = substr $text, 0, $_; my $b = substr $text, $_; $coder->incr_parse ($a); $coder->incr_parse ($b); my $data = $coder->incr_parse; ok ($data); is ($coder->encode ($data), $coder->encode ($coder->decode ($text)), "data"); ok ($coder->incr_text =~ /^\s*$/, "tailws"); } } splitter +JSON::PP->new , ' ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]'; splitter +JSON::PP->new , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] '; splitter +JSON::PP->new->allow_nonref, '"test"'; splitter +JSON::PP->new->allow_nonref, ' "5" '; { my $text = '[5],{"":1} , [ 1,2, 3], {"3":null}'; my $coder = new JSON::PP; for (0 .. length $text) { my $a = substr $text, 0, $_; my $b = substr $text, $_; $coder->incr_parse ($a); $coder->incr_parse ($b); my $j1 = $coder->incr_parse; ok ($coder->incr_text =~ s/^\s*,//, "cskip1"); my $j2 = $coder->incr_parse; ok ($coder->incr_text =~ s/^\s*,//, "cskip2"); my $j3 = $coder->incr_parse; ok ($coder->incr_text =~ s/^\s*,//, "cskip3"); my $j4 = $coder->incr_parse; ok ($coder->incr_text !~ s/^\s*,//, "cskip4"); my $j5 = $coder->incr_parse; ok ($coder->incr_text !~ s/^\s*,//, "cskip5"); ok ('[5]' eq encode_json $j1, "cjson1"); ok ('{"":1}' eq encode_json $j2, "cjson2"); ok ('[1,2,3]' eq encode_json $j3, "cjson3"); ok ('{"3":null}' eq encode_json $j4, "cjson4"); ok (!defined $j5, "cjson5"); } } { my $text = '[x][5]'; my $coder = new JSON::PP; $coder->incr_parse ($text); ok (!eval { $coder->incr_parse }, "sparse1"); ok (!eval { $coder->incr_parse }, "sparse2"); $coder->incr_skip; ok ('[5]' eq $coder->encode (scalar $coder->incr_parse), "sparse3"); } 1 TEST } else { eval <<'TEST' or die "Failed to eval test code for version $]: $@"; my $incr_text; sub splitter { my ($coder, $text) = @_; for (0 .. length $text) { my $a = substr $text, 0, $_; my $b = substr $text, $_; $coder->incr_parse ($a); $coder->incr_parse ($b); my $data = $coder->incr_parse; ok ($data); ok ($coder->encode ($data) eq $coder->encode ($coder->decode ($text)), "data"); ok (($incr_text = $coder->incr_text) =~ /^\s*$/, "tailws"); } } splitter +JSON::PP->new , ' ["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]'; splitter +JSON::PP->new , '[ "x\\"","\\u1000\\\\n\\nx" , 1,{"\\\\ " :5 , "": " x"} ] '; splitter +JSON::PP->new->allow_nonref, '"test"'; splitter +JSON::PP->new->allow_nonref, ' "5" '; { my $text = '[5],{"":1} , [ 1,2, 3], {"3":null}'; my $coder = new JSON::PP; for (0 .. length $text) { my $a = substr $text, 0, $_; my $b = substr $text, $_; $coder->incr_parse ($a); $coder->incr_parse ($b); my $j1 = $coder->incr_parse; ok ( $coder->incr_text( ($incr_text = $coder->incr_text) =~ s/^\s*,// and $incr_text ), "cskip1"); my $j2 = $coder->incr_parse; ok ( $coder->incr_text( ($incr_text = $coder->incr_text) =~ s/^\s*,// and $incr_text ), "cskip2"); my $j3 = $coder->incr_parse; ok ( $coder->incr_text( ($incr_text = $coder->incr_text) =~ s/^\s*,// and $incr_text ), "cskip3"); my $j4 = $coder->incr_parse; ok (($incr_text = $coder->incr_text) !~ s/^\s*,//, "cskip4"); my $j5 = $coder->incr_parse; ok (($incr_text = $coder->incr_text) !~ s/^\s*,//, "cskip5"); ok ('[5]' eq encode_json $j1, "cjson1"); ok ('{"":1}' eq encode_json $j2, "cjson2"); ok ('[1,2,3]' eq encode_json $j3, "cjson3"); ok ('{"3":null}' eq encode_json $j4, "cjson4"); ok (!defined $j5, "cjson5"); } } { my $text = '[x][5]'; my $coder = new JSON::PP; $coder->incr_parse ($text); ok (!eval { $coder->incr_parse }, "sparse1"); ok (!eval { $coder->incr_parse }, "sparse2"); $coder->incr_skip; ok ('[5]' eq $coder->encode (scalar $coder->incr_parse), "sparse3"); } TEST } # for 5.005 { my $coder = JSON::PP->new->max_size (5); ok (!$coder->incr_parse ("[ "), "incsize1"); eval q{ !$coder->incr_parse ("] ") }; ok ($@ =~ /6 bytes/, "incsize2 $@"); } { my $coder = JSON::PP->new->max_depth (3); ok (!$coder->incr_parse ("[[["), "incdepth1"); eval q{ !$coder->incr_parse (" [] ") }; ok ($@ =~ /maximum nesting/, "incdepth2 $@"); } { my $coder = JSON::PP->new; my $res = eval { $coder->incr_parse("]") }; my $e = $@; # test more clobbers $@, we need it twice ok(!$res, "unbalanced bracket" ); ok($e, "got error"); like( $e, qr/malformed/, "malformed json string error" ); $coder->incr_skip; is_deeply(eval { $coder->incr_parse("[42]") }, [42], "valid data after incr_skip"); }