summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Schneider2008-07-28 15:20:54 +0000
committerChristian Schneider2008-07-28 15:20:54 +0000
commit03443412d7038a8a68da1137ea7e6b38fdbc728c (patch)
tree3c0172544631b3175f8f9b8d9cdf026de82346ce /tests
parent92e07b4f66121d0509acf2931e084b7a62dc0ee2 (diff)
downloaditools-03443412d7038a8a68da1137ea7e6b38fdbc728c.tar.gz
itools-03443412d7038a8a68da1137ea7e6b38fdbc728c.tar.bz2
itools-03443412d7038a8a68da1137ea7e6b38fdbc728c.zip
Quote identifier if it is a javascript reserved word
Diffstat (limited to 'tests')
-rwxr-xr-xtests/itjs.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/itjs.t b/tests/itjs.t
index 4b4b0c8..ef3437a 100755
--- a/tests/itjs.t
+++ b/tests/itjs.t
@@ -41,4 +41,10 @@ is(
'nested arrays'
);
+is(
+ itjs::serialize(array('import' => array('function' => array(true, 42)))),
+ '{\'import\':{\'function\':[true, 42]}}',
+ 'keywords'
+);
+
?>