From d59a4921188753dbe4c0161081755a28112c3ef6 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Thu, 22 Mar 2012 18:18:42 +0000 Subject: Branch itools/devel-utf8 created --- devel-utf8/tests/itjs.t | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 devel-utf8/tests/itjs.t (limited to 'devel-utf8/tests/itjs.t') diff --git a/devel-utf8/tests/itjs.t b/devel-utf8/tests/itjs.t new file mode 100755 index 0000000..f616ced --- /dev/null +++ b/devel-utf8/tests/itjs.t @@ -0,0 +1,50 @@ +#!/www/server/bin/php -qC + "bar", "qux", 42 => "quux")), + "{foo:\"bar\",\n'0':\"qux\",\n'42':\"quux\"}", + 'key-value pairs' +); + +is( + itjs::serialize(array('foo' => array('bar' => array("qux", 42)))), + '{foo:{bar:["qux", 42]}}', + 'nested arrays' +); + +is( + itjs::serialize(array('import' => array('function' => array(true, 42)))), + '{\'import\':{\'function\':[true, 42]}}', + 'keywords' +); + +?> -- cgit v1.2.3