geirm 00/11/05 11:21:15
Modified: test/templates block.vm pedantic.vm
test/templates/compare block.cmp foreach-map.cmp loop.cmp
pedantic.cmp
Log:
slight mods to the .vm and .cmp's to reflect changes and additions to whitespace
handling. Will summarize to list later.
Revision Changes Path
1.5 +3 -2 jakarta-velocity/test/templates/block.vm
Index: block.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/block.vm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- block.vm 2000/11/03 03:28:25 1.4
+++ block.vm 2000/11/05 19:21:13 1.5
@@ -72,10 +72,11 @@
blargh#if(true)This immedately follows blargh with a following newline
#end
--- Fourth Test : another tight tight tight. Note that a space trailing the \#end
does the trick.
+-- Fourth Test : another tight tight tight. If you want the \n, then put one
*after* the content, not a space after \#end.
-- one blank line follows
-blargh #if(true)This follows blargh#end
+blargh #if(true)This follows blargh
+#end
blargh#if(true)This immedately follows blargh with a following newline
#end
1.4 +32 -5 jakarta-velocity/test/templates/pedantic.vm
Index: pedantic.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/pedantic.vm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pedantic.vm 2000/11/03 03:28:26 1.3
+++ pedantic.vm 2000/11/05 19:21:13 1.4
@@ -49,20 +49,47 @@
woogie!
--
-2) You can even just have spaces : be careful!
+2) Whitespace will be eaten if there is a following newline
--
#if ($pedantic)
$pedantic
-#end
-<preceeded by a line with just 2 spaces>
+#end
--
should be
--
pedantic
-
-<preceeded by a line with just 2 spaces>
--
+
+-- INLINE STUFF ---
+
+1) respect spaces in the block
+>#foreach($a in $stringarray)$a#end<
+>#foreach($a in $stringarray) $a#end<
+>#foreach($a in $stringarray)$a #end<
+>#foreach($a in $stringarray) $a #end<
+
+2) set statement has no output, incuding preceeding whitespace
+#foreach($a in $stringarray)
+ #set $b = $a
+ $a is $b
+#end
+
+ public void foo( String lala )
+ {
+#foreach($a in $stringarray)
+ #set $b = $a
+ System.out.println("$b");
+#end
+ }
+
+ public void foo( String lala )
+ {
+ #foreach($a in $stringarray)
+ #set $b = $a
+ System.out.println("$b");
+ #end
+ }
1.3 +2 -2 jakarta-velocity/test/templates/compare/block.cmp
Index: block.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/block.cmp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- block.cmp 2000/10/31 16:07:27 1.2
+++ block.cmp 2000/11/05 19:21:14 1.3
@@ -23,10 +23,10 @@
blargh This follows blarghblarghThis immedately follows blargh with a following
newline
--- Fourth Test : another tight tight tight. Note that a space trailing the #end
does the trick.
+-- Fourth Test : another tight tight tight. If you want the \n, then put one
*after* the content, not a space after #end.
-- one blank line follows
-blargh This follows blargh
+blargh This follows blargh
blarghThis immedately follows blargh with a following newline
-- Fifth Test : different kind of tight. blank line follows
1.2 +0 -1 jakarta-velocity/test/templates/compare/foreach-map.cmp
Index: foreach-map.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/foreach-map.cmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- foreach-map.cmp 2000/11/01 19:34:50 1.1
+++ foreach-map.cmp 2000/11/05 19:21:14 1.2
@@ -3,4 +3,3 @@
value2
value1
value0
-
1.3 +4 -4 jakarta-velocity/test/templates/compare/loop.cmp
Index: loop.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/loop.cmp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- loop.cmp 2000/11/01 01:13:21 1.2
+++ loop.cmp 2000/11/05 19:21:14 1.3
@@ -1,6 +1,6 @@
- hello< ArrayList element 1 >
- hello< ArrayList element 2 >
- hello< ArrayList element 3 >
- hello< ArrayList element 4 >
+ hello< ArrayList element 1 >
+ hello< ArrayList element 2 >
+ hello< ArrayList element 3 >
+ hello< ArrayList element 4 >
1.2 +25 -5 jakarta-velocity/test/templates/compare/pedantic.cmp
Index: pedantic.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/pedantic.cmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pedantic.cmp 2000/10/31 16:20:35 1.1
+++ pedantic.cmp 2000/11/05 19:21:14 1.2
@@ -36,19 +36,39 @@
woogie!
--
-2) You can even just have spaces : be careful!
+2) Whitespace will be eaten if there is a following newline
--
pedantic
-
-<preceeded by a line with just 2 spaces>
--
should be
--
pedantic
-
-<preceeded by a line with just 2 spaces>
--
+
+-- INLINE STUFF ---
+
+1) respect spaces in the block
+>first elementsecond element<
+> first element second element<
+>first element second element <
+> first element second element <
+
+2) set statement has no output, incuding preceeding whitespace
+ first element is first element
+ second element is second element
+
+ public void foo( String lala )
+ {
+ System.out.println("first element");
+ System.out.println("second element");
+ }
+
+ public void foo( String lala )
+ {
+ System.out.println("first element");
+ System.out.println("second element");
+ }