summaryrefslogtreecommitdiff
path: root/tests/itjs.t
diff options
context:
space:
mode:
authorUrban Müller2018-06-21 16:42:32 +0200
committerUrban Müller2018-06-21 16:43:32 +0200
commit3dabbbd5325c9fad9582cd44b1da68dece78eaa0 (patch)
tree92d951b948f0e01dc6b7ae3f11b9c03034edb69a /tests/itjs.t
parent455b15f7a850a58ef667ad170732769043eb1522 (diff)
downloaditools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.tar.gz
itools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.tar.bz2
itools-3dabbbd5325c9fad9582cd44b1da68dece78eaa0.zip
no reason for different naming
Diffstat (limited to 'tests/itjs.t')
-rwxr-xr-xtests/itjs.t66
1 files changed, 0 insertions, 66 deletions
diff --git a/tests/itjs.t b/tests/itjs.t
deleted file mode 100755
index 695ccd8..0000000
--- a/tests/itjs.t
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/www/server/bin/php -qC
-<?php
-
-# Tests for itjs.class, currently only itjs::serialize()
-
-$_GET['aa'] = 1;
-
-is(
- itjs::serialize(null),
- 'null',
- 'null'
-);
-
-is(
- itjs::serialize(array()),
- '[]',
- 'empty array'
-);
-
-is(
- itjs::serialize(array(0, "0")),
- '[0, 0]',
- 'number 0'
-);
-
-is(
- itjs::serialize(array(null, "", false)),
- '["", "", false]',
- 'null, empty string, false'
-);
-
-is(
- itjs::serialize(array(42, "42", 42.5, "042")),
- '[42, 42, "42.5", "042"]',
- 'numbers'
-);
-
-is(
- itjs::serialize(array('foo' => "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'
-);
-
-is(
- itjs::serialize(array("foo'foo" => "bar")),
- "{'foo\'foo':\"bar\"}",
- "quote ' in keys"
-);
-
-is(
- itjs::serialize("hellö"),
- '"hellö"',
- "string"
-);