You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2016/09/06 16:17:12 UTC

svn commit: r1759453 - in /velocity/engine/trunk/velocity-engine-core/src: main/parser/ test/resources/gobbling/ test/resources/gobbling/compare/

Author: cbrisson
Date: Tue Sep  6 16:17:12 2016
New Revision: 1759453

URL: http://svn.apache.org/viewvc?rev=1759453&view=rev
Log:
some more indentation bugfixes and testcases

Added:
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.BC
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.NONE
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.STRUCTURED
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.BC
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.LINES
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.NONE
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.STRUCTURED
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly1.vtl
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly2.vtl
Removed:
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.SMART
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.SMART
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.SMART
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.SMART
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.SMART
    velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.SMART
Modified:
    velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt

Modified: velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt?rev=1759453&r1=1759452&r2=1759453&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt (original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/parser/Parser.jjt Tue Sep  6 16:17:12 2016
@@ -679,7 +679,7 @@ TOKEN:
  *  http://www.engr.mun.ca/~theo/JavaCC-FAQ/javacc-faq-ie.htm#tth_sEc3.12
  *
  */
-<DEFAULT, REFERENCE, REFMODIFIER, REFMOD2>
+<DEFAULT, PRE_REFERENCE, REFERENCE, REFMODIFIER, REFMOD2>
 TOKEN:
 {
   <SET_DIRECTIVE: ("#set" | "#{set}")  (" "|"\t")* "(">
@@ -725,11 +725,11 @@ MORE :
         if (! inComment)
         {
             /*
-             * if we find ourselves in REFERENCE, we need to pop down
+             * if we find ourselves in REFERENCE or PRE_REFERENCE, we need to pop down
              * to end the previous ref
              */
 
-            if (curLexState == REFERENCE)
+            if (curLexState == REFERENCE || curLexState == PRE_REFERENCE)
             {
                 inReference = false;
                 stateStackPop();
@@ -738,10 +738,10 @@ MORE :
             inReference = true;
 
             if ( debugPrint )
-                System.out.print( "$  : going to " + REFERENCE );
+                System.out.print( "$  : going to " + PRE_REFERENCE );
 
             stateStackPush();
-            SwitchTo(REFERENCE);
+            SwitchTo(PRE_REFERENCE);
         }
     }
 
@@ -750,11 +750,11 @@ MORE :
         if (! inComment)
         {
             /*
-             * if we find ourselves in REFERENCE, we need to pop down
+             * if we find ourselves in REFERENCE or PRE_REFERENCE, we need to pop down
              * to end the previous ref
              */
 
-            if (curLexState == REFERENCE)
+            if (curLexState == REFERENCE || curLexState == PRE_REFERENCE)
             {
                 inReference = false;
                 stateStackPop();
@@ -763,10 +763,10 @@ MORE :
             inReference = true;
 
             if ( debugPrint )
-                System.out.print( "$!  : going to " + REFERENCE );
+                System.out.print( "$!  : going to " + PRE_REFERENCE );
 
             stateStackPush();
-            SwitchTo(REFERENCE);
+            SwitchTo(PRE_REFERENCE);
         }
     }
 
@@ -812,7 +812,7 @@ MORE :
              * you are going into DIRECTIVE while in REFERENCE.  -gmj
              */
 
-            if (curLexState == REFERENCE || curLexState == REFMODIFIER )
+            if (curLexState == REFERENCE || curLexState == PRE_REFERENCE || curLexState == REFMODIFIER )
             {
                 inReference = false;
                 stateStackPop();
@@ -824,19 +824,19 @@ MORE :
             stateStackPush();
             SwitchTo(PRE_DIRECTIVE);
         }
-    }
+  }
 }
 
 // treat the single line comment case separately
 // to avoid ##<EOF> errors
-<DEFAULT,PRE_DIRECTIVE,DIRECTIVE,REFERENCE>
+<DEFAULT,PRE_DIRECTIVE,DIRECTIVE,REFERENCE,PRE_REFERENCE>
 TOKEN :
 {
    <SINGLE_LINE_COMMENT_START: "##">
    {
         if (!inComment)
         {
-            if (curLexState == REFERENCE)
+            if (curLexState == REFERENCE || curLexState == PRE_REFERENCE)
             {
                 inReference = false;
                 stateStackPop();
@@ -929,6 +929,19 @@ TOKEN:
     }
 }
 
+/* needed for stuff like #foo() followed by ( '$' | '#' )* followed by ( <WHITESPACE> | <ENDLINE> )
+   so that directive postfix doesn't eat the '$'s and '#'s
+*/
+<PRE_DIRECTIVE, PRE_REFERENCE>
+TOKEN:
+{
+  <SUFFIX: ([" ","\t"])* ("\n" | "\r" | "\r\n")>
+  {
+    inReference = false;
+    stateStackPop();
+    }
+}
+
 <DIRECTIVE,REFMOD2,REFINDEX>
 TOKEN :
 {
@@ -1105,9 +1118,11 @@ TOKEN:
  *  for each state can be different.
  *
  *  $foo.bar( "arg" )
- *  ^   ^   ^       ^
- *  |   |   |       |
- *  |_________________ >  REFERENCE : state initiated by the '$' character.  Continues
+ *  ^ ^ ^   ^       ^
+ *  | | |   |       |
+ *  |_________________ >  PRE_REFERENCE : state initiated by the '$' character.
+ *  | | |   |       |
+ *  |__________________>  REFERENCE : state initiated by the identifier. Continues
  *      |   |       |     until end of the reference, or the . character.
  *      |_____________ >  REFMODIFIER : state switched to when the <DOT> is encountered.
  *          |       |     note that this is a switch, not a push. See notes at bottom.
@@ -1120,12 +1135,18 @@ TOKEN:
  *  or $foo.bar[1], $foo.bar( "arg" )[1]
  * ---------------------------------------------------------------------------- */
 
-<REFERENCE,REFMODIFIER,REFMOD2>
+<PRE_REFERENCE,REFMODIFIER,REFMOD2>
 TOKEN :
 {
     <#ALPHA_CHAR: ["a"-"z", "A"-"Z", "_"] >
 |   <#IDENTIFIER_CHAR: [ "a"-"z", "A"-"Z", "0"-"9", "_" ] >
 |   <IDENTIFIER:  ( <ALPHA_CHAR> ) (<IDENTIFIER_CHAR>)* >
+    {
+        if (curLexState == PRE_REFERENCE)
+        {
+            SwitchTo(REFERENCE);
+        }
+    }
 }
 
 <REFERENCE,REFMODIFIER,REFMOD2,REFMOD3>
@@ -1154,7 +1175,7 @@ TOKEN:
     }
 }
 
-<REFERENCE,REFMODIFIER,REFMOD3>
+<PRE_REFERENCE,REFERENCE,REFMODIFIER,REFMOD3>
 TOKEN :
 {
     <LCURLY: "{">
@@ -1164,7 +1185,7 @@ TOKEN :
     }
 }
 
-<REFERENCE,REFMODIFIER,REFMOD,REFMOD3>
+<PRE_REFERENCE,REFERENCE,REFMODIFIER,REFMOD,REFMOD3>
 SPECIAL_TOKEN :
 {
     <REFERENCE_TERMINATOR: ~[] >
@@ -1251,6 +1272,7 @@ boolean Statement(boolean afterNewline)
 |   (<NEWLINE>) #Text { return true; }
 |   (<INLINE_TEXT> ((<TEXT>)? { b = true; }) ) #Text { return b; }
 |   (<WHITESPACE>) #Text { return false; }
+|   (<SUFFIX>) #Text { return true; }
 }
 
 /**
@@ -1796,7 +1818,7 @@ void False() : {}
  * with the LOOKAHEAD in Reference, but I never found a way to resolve
  * it in a more fashionable way..
  */
-<DEFAULT,REFERENCE>
+<DEFAULT,PRE_REFERENCE>
 TOKEN :
 {
   <EMPTY_INDEX : ("$[" | "$![" | "$\\![" | "$.")>

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+<table>
+  <tbody>
+    <tr>
+      <td>
+        first cell
+      </td>
+      <td>
+        middle cell
+      </td>
+    </tr>
+    <tr>
+      <td>
+        middle cell
+      </td>
+      <td>
+        middle cell
+      </td>
+    </tr>
+  </tbody>
+</table>

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+<table>
+  <tbody>
+      <tr>
+          <td>
+              first cell
+          </td>
+          <td>
+              middle cell
+          </td>
+      </tr>
+      <tr>
+          <td>
+              middle cell
+          </td>
+          <td>
+              middle cell
+          </td>
+      </tr>
+  </tbody>
+</table>

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,58 @@
+y yyy             
+  y
+  y
+  y
+  y
+  z
+  z
+  z
+  z
+  z
+  z
+  z
+  z
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+  t
+
+    y
+    y
+    y
+    y
+    z
+    z
+    z
+    z
+    z
+    z
+    z
+    z
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t
+    t

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+
+
+
+
+
+<a>
+  <b>
+line1line2line3
+line4
+block foo
+  </b>
+</a>
+
+<a>
+  <b>
+line1line2line3
+line4
+block foo
+  </b>
+</a>

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,3 @@
+ postfix
+ postfix
+prefix prefix  postfix

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,7 @@
+<table>
+    <tr>
+        <td>
+          blabla
+        </td>
+    </tr>
+</table>

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.BC
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.BC?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.BC (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.BC Tue Sep  6 16:17:12 2016
@@ -0,0 +1,16 @@
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,16 @@
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.NONE
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.NONE?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.NONE (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.NONE Tue Sep  6 16:17:12 2016
@@ -0,0 +1,16 @@
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.STRUCTURED
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.STRUCTURED?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.STRUCTURED (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly1.vtl.STRUCTURED Tue Sep  6 16:17:12 2016
@@ -0,0 +1,16 @@
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.BC
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.BC?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.BC (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.BC Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+$$
+$$
+$true$$
+$true$$
+---
+ $
+ #
+ $bar$
+ $bar#
+ $bar 
+ $bar$
+ $bar#
+ $bar 
+ #bar$
+ #bar#
+ #bar 
+ $bar$
+ $bar#
+ $bar 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.LINES
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.LINES?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.LINES (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.LINES Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+$$
+$$
+$true$$
+$true$$
+---
+ $
+ #
+ $bar$
+ $bar#
+ $bar 
+ $bar$
+ $bar#
+ $bar 
+ #bar$
+ #bar#
+ #bar 
+ $bar$
+ $bar#
+ $bar 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.NONE
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.NONE?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.NONE (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.NONE Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+$$
+$$
+$true$$
+$true$$
+---
+ $
+ #
+ $bar$
+ $bar#
+ $bar 
+ $bar$
+ $bar#
+ $bar 
+ #bar$
+ #bar#
+ #bar 
+ $bar$
+ $bar#
+ $bar 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.STRUCTURED
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.STRUCTURED?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.STRUCTURED (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/ugly2.vtl.STRUCTURED Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+$$
+$$
+$true$$
+$true$$
+---
+ $
+ #
+ $bar$
+ $bar#
+ $bar 
+ $bar$
+ $bar#
+ $bar 
+ #bar$
+ #bar#
+ #bar 
+ $bar$
+ $bar#
+ $bar 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly1.vtl
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly1.vtl?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly1.vtl (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly1.vtl Tue Sep  6 16:17:12 2016
@@ -0,0 +1,16 @@
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---

Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly2.vtl
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly2.vtl?rev=1759453&view=auto
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly2.vtl (added)
+++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/ugly2.vtl Tue Sep  6 16:17:12 2016
@@ -0,0 +1,20 @@
+$#macro(foo)bar#end$
+$#set($foo = 'bar')$
+$#if(true)true$#{else}false$#end$
+$#if(false)false$#{else}true$#end$
+---
+ $
+ #
+ $$foo$
+ $$foo#
+ $#foo 
+ $#foo$
+ $#foo#
+ $#foo 
+ #$foo$
+ #$foo#
+ #$foo 
+ $#@foo()hop#end$
+ $#@foo()hop#end#
+ $#@foo()hop#end 
+---