Author: nbubna
Date: Mon Sep 22 11:32:49 2008
New Revision: 697935
URL: http://svn.apache.org/viewvc?rev=697935&view=rev
Log:
VELOCITY-614 add test cases to show that escaping works as it should
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity614TestCase.java
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity614TestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity614TestCase.java?rev=697935&r1=697934&r2=697935&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity614TestCase.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity614TestCase.java
Mon Sep 22 11:32:49 2008
@@ -38,6 +38,18 @@
assertEvalEquals(template, template);
}
+ public void testEscapeSchmooButNotReallySinceSchmooHasNoEscaping()
+ {
+ String template = "\\#something(Stuff)";
+ assertEvalEquals(template, template);
+ }
+
+ public void testEscapeMacroWithBadArg()
+ {
+ String template = "#macro( evil $arg )$arg#end \\#evil(bar)";
+ assertEvalEquals(" #evil(bar)", template);
+ }
+
public void testEarlyDefinedMacroWithBadArg()
{
assertEvalException("#macro( evil $arg )$arg#end #evil(bar)");