From 21c5a1c7497fbbaffb08c1454f7818bc1279a14d Mon Sep 17 00:00:00 2001 From: Jonas Tarnstrom Date: Wed, 14 Dec 2011 15:25:41 +0100 Subject: [PATCH] Added support for escaping front slash --- python/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tests.py b/python/tests.py index 0b20e71..c0b5f5b 100644 --- a/python/tests.py +++ b/python/tests.py @@ -59,10 +59,10 @@ class UltraJSONTests(TestCase): self.assertEquals(input, ujson.decode(output)) def test_encodeStringConversion(self): - input = "A string \\ \/ \b \f \n \r \t" + input = "A string \\ / \b \f \n \r \t" output = ujson.encode(input) self.assertEquals(input, json.loads(output)) - self.assertEquals(output, json.dumps(input)) + self.assertEquals(output, '"A string \\\\ \\/ \\b \\f \\n \\r \\t"') self.assertEquals(input, ujson.decode(output)) pass