[Pkg-javascript-commits] [sockjs-client] 224/434: Old Firefox has an interesting JSON encoder - encodes tab as \u0009 instead of \t

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 20c0df32908baca2d73a1e920c37b47fe1e7367c
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Mon Nov 28 17:26:54 2011 +0000

    Old Firefox has an interesting JSON encoder - encodes tab as \u0009 instead of \t
---
 tests/html/src/unittests.coffee | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/html/src/unittests.coffee b/tests/html/src/unittests.coffee
index 8882f0d..caea176 100644
--- a/tests/html/src/unittests.coffee
+++ b/tests/html/src/unittests.coffee
@@ -62,8 +62,8 @@ test 'arrIndexOf', ->
 test 'quote', ->
     equal(u.quote(''), '""')
     equal(u.quote('a'), '"a"')
-    equal(u.quote('\t'), '"\\t"')
-    equal(u.quote('\n'), '"\\n"')
+    ok(u.arrIndexOf(['"\\t"', '"\\u0009"'], u.quote('\t')) isnt -1)
+    ok(u.arrIndexOf(['"\\n"', '"\\u000a"'], u.quote('\n')) isnt -1)
     equal(u.quote('\x00\udfff\ufffe\uffff'), '"\\u0000\\udfff\\ufffe\\uffff"')
     # Unicode surrogates, formally incorrect unicode datapoints:
     equal(u.quote('\ud85c\udff7\ud800\ud8ff'), '"\\ud85c\\udff7\\ud800\\ud8ff"')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list