This is an automated email from the ASF dual-hosted git repository.

henrib pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a46b94  [JEXL]: - preparing to add 'escaped' identifiers
2a46b94 is described below

commit 2a46b941bbe18e5f3a2e6d05032f067bb3ce76a4
Author: henrib <>
AuthorDate: Wed May 16 10:40:19 2018 +0200

    [JEXL]:
    - preparing to add 'escaped' identifiers
---
 src/test/java/org/apache/commons/jexl3/parser/ParserTest.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/test/java/org/apache/commons/jexl3/parser/ParserTest.java 
b/src/test/java/org/apache/commons/jexl3/parser/ParserTest.java
index 9bc5fce..4d0fec0 100644
--- a/src/test/java/org/apache/commons/jexl3/parser/ParserTest.java
+++ b/src/test/java/org/apache/commons/jexl3/parser/ParserTest.java
@@ -76,4 +76,14 @@ public class ParserTest {
             Assert.fail(xother.toString());
         }
     }
+        
+    @Test
+    public void testIdentifierEscape() {
+        String[] ids = new String[]{"a\\ b", "a\\ b\\ c", "a\\'b\\\"c", "a\\ 
\\ c"};
+        for(String id : ids) {
+            String esc0 = StringParser.escapeIdentifier(id);
+            String esc1 = StringParser.unescapeIdentifier(esc0);
+            Assert.assertEquals(id, esc1);
+        }
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
hen...@apache.org.

Reply via email to