felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1783740 - /felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java
Date Mon, 20 Feb 2017 11:12:34 GMT
Author: chetanm
Date: Mon Feb 20 11:12:34 2017
New Revision: 1783740

URL: http://svn.apache.org/viewvc?rev=1783740&view=rev
Log:
FELIX-5555 - JSONParser is not handling escape char properly

Adding ignored test

Modified:
    felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java

Modified: felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java?rev=1783740&r1=1783739&r2=1783740&view=diff
==============================================================================
--- felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java (original)
+++ felix/trunk/utils/src/test/java/org/apache/felix/utils/json/JSONParserTest.java Mon Feb
20 11:12:34 2017
@@ -16,11 +16,13 @@
  */
 package org.apache.felix.utils.json;
 
+import java.io.StringWriter;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -74,4 +76,15 @@ public class JSONParserTest {
         result.put("def", Collections.emptyList());
         assertEquals(result, m.get("abc"));
     }
+
+    @Ignore("FELIX-5555")
+    @Test
+    public void escapeChar() throws Exception{
+        StringWriter sw = new StringWriter();
+        JSONWriter js = new JSONWriter(sw);
+        js.object().key("foo").value("/bar").endObject().flush();
+
+        JSONParser jp = new JSONParser(sw.toString());
+        assertEquals("/bar", jp.getParsed().get("foo"));
+    }
 }



Mime
View raw message