dion 2004/08/19 11:05:26
Modified: jexl/src/test/org/apache/commons/jexl JexlTest.java
Log:
Add a test for the comment
Revision Changes Path
1.43 +11 -3
jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java
Index: JexlTest.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- JexlTest.java 19 Aug 2004 17:35:47 -0000 1.42
+++ JexlTest.java 19 Aug 2004 18:05:26 -0000 1.43
@@ -1107,14 +1107,22 @@
{
try
{
- JexlContext jc = JexlHelper.createContext();
- Expression e = ExpressionFactory.createExpression("empty()");
+ assertExpression(JexlHelper.createContext(), "empty()", null);
}
catch (ParseException pe)
{
System.err.println("Expecting a parse exception: " + pe.getMessage());
}
}
+
+ /**
+ * Test the ## comment in a string
+ * @throws Exception
+ */
+ public void testComment() throws Exception
+ {
+ assertExpression(JexlHelper.createContext(), "## double or nothing\n 1 +
1", Long.valueOf("2"));
+ }
/**
* Asserts that the given expression returns the given value when applied to the
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]