summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t')
-rw-r--r--chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t68
1 files changed, 0 insertions, 68 deletions
diff --git a/chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t b/chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t
deleted file mode 100644
index 8c90e288114..00000000000
--- a/chromium/third_party/JSON/JSON-2.59/t/06_pc_pretty.t
+++ /dev/null
@@ -1,68 +0,0 @@
-
-# copied over from JSON::PC and modified to use JSON
-# copied over from JSON::XS and modified to use JSON
-
-use strict;
-use Test::More;
-BEGIN { plan tests => 9 };
-
-BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
-
-use JSON;
-
-my ($js,$obj,$json);
-my $pc = new JSON;
-
-$obj = {foo => "bar"};
-$js = $pc->encode($obj);
-is($js,q|{"foo":"bar"}|);
-
-$obj = [10, "hoge", {foo => "bar"}];
-$pc->pretty (1);
-$js = $pc->encode($obj);
-is($js,q|[
- 10,
- "hoge",
- {
- "foo" : "bar"
- }
-]
-|);
-
-$obj = { foo => [ {a=>"b"}, 0, 1, 2 ] };
-$pc->pretty(0);
-$js = $pc->encode($obj);
-is($js,q|{"foo":[{"a":"b"},0,1,2]}|);
-
-
-$obj = { foo => [ {a=>"b"}, 0, 1, 2 ] };
-$pc->pretty(1);
-$js = $pc->encode($obj);
-is($js,q|{
- "foo" : [
- {
- "a" : "b"
- },
- 0,
- 1,
- 2
- ]
-}
-|);
-
-$obj = { foo => [ {a=>"b"}, 0, 1, 2 ] };
-$pc->pretty(0);
-$js = $pc->encode($obj);
-is($js,q|{"foo":[{"a":"b"},0,1,2]}|);
-
-
-$obj = {foo => "bar"};
-$pc->indent(3); # original -- $pc->indent(1);
-is($pc->encode($obj), qq|{\n "foo":"bar"\n}\n|, "nospace");
-$pc->space_after(1);
-is($pc->encode($obj), qq|{\n "foo": "bar"\n}\n|, "after");
-$pc->space_before(1);
-is($pc->encode($obj), qq|{\n "foo" : "bar"\n}\n|, "both");
-$pc->space_after(0);
-is($pc->encode($obj), qq|{\n "foo" :"bar"\n}\n|, "before");
-