Copied: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SpaceGobblingTestCase.java (from r1754151, velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java) URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SpaceGobblingTestCase.java?p2=velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SpaceGobblingTestCase.java&p1=velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java&r1=1754151&r2=1758416&rev=1758416&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SpaceGobblingTestCase.java Tue Aug 30 16:18:33 2016 @@ -16,44 +16,32 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.velocity.test.util.introspection; +package org.apache.velocity.test; import junit.framework.TestSuite; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.app.event.MethodExceptionEventHandler; import org.apache.velocity.runtime.RuntimeConstants; -import org.apache.velocity.runtime.RuntimeInstance; -import org.apache.velocity.test.BaseTestCase; -import org.apache.velocity.test.misc.TestLogger; -import org.apache.velocity.util.introspection.ConversionHandler; -import org.apache.velocity.util.introspection.ConversionHandlerImpl; -import org.apache.velocity.util.introspection.Converter; -import org.apache.velocity.util.introspection.Info; -import org.apache.velocity.util.introspection.IntrospectionUtils; -import org.apache.velocity.util.introspection.Uberspect; -import org.apache.velocity.util.introspection.UberspectImpl; +import org.apache.velocity.runtime.RuntimeConstants.SpaceGobbling; import java.io.BufferedWriter; +import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; -import java.io.StringWriter; import java.io.Writer; -import java.util.Map; -import java.util.TreeMap; /** * Test case for conversion handler */ -public class ConversionHandlerTestCase extends BaseTestCase +public class SpaceGobblingTestCase extends BaseTestCase { - private static final String RESULT_DIR = TEST_RESULT_DIR + "/conversion"; + private static final String RESULT_DIR = TEST_RESULT_DIR + "/gobbling"; - private static final String COMPARE_DIR = TEST_COMPARE_DIR + "/conversion/compare"; + private static final String COMPARE_DIR = TEST_COMPARE_DIR + "/gobbling/compare"; - public ConversionHandlerTestCase(String name) + public SpaceGobblingTestCase(String name) { super(name); } @@ -70,86 +58,63 @@ public class ConversionHandlerTestCase e */ public static junit.framework.Test suite() { - return new TestSuite(ConversionHandlerTestCase.class); + return new TestSuite(SpaceGobblingTestCase.class); } - - public void testConversionsWithoutHandler() - throws Exception - { - /* - * local scope, cache on - */ - VelocityEngine ve = createEngine(false); - testConversions(ve, "test_conv.vtl", "test_conv_without_handler"); - } - - public void testConversionsWithHandler() + /** + * Return and initialize engine + * @return + */ + private VelocityEngine createEngine(SpaceGobbling mode) throws Exception { - /* - * local scope, cache on - */ - VelocityEngine ve = createEngine(true); + VelocityEngine ve = new VelocityEngine(); + ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log); + ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); + ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/gobbling"); + ve.setProperty(RuntimeConstants.SPACE_GOBBLING, mode.toString()); + ve.init(); - testConversions(ve, "test_conv.vtl", "test_conv_with_handler"); + return ve; } - public void testConversionMatrix() - throws Exception + public void testSpaceGobbling() throws Exception { - VelocityEngine ve = createEngine(true); - testConversions(ve, "matrix.vhtml", "matrix"); + for (SpaceGobbling mode : SpaceGobbling.values()) + { + testMode(mode); + } } - public void testCustomConverter() + private void testMode(SpaceGobbling mode) throws Exception { - RuntimeInstance ve = new RuntimeInstance(); - ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE); - ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log); - ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); - ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/conversion"); - ve.init(); - Uberspect uberspect = ve.getUberspect(); - assertTrue(uberspect instanceof UberspectImpl); - UberspectImpl ui = (UberspectImpl)uberspect; - ConversionHandler ch = ui.getConversionHandler(); - assertTrue(ch != null); - ch.addConverter(Float.class, Obj.class, new Converter<Float>() + VelocityEngine ve = createEngine(mode); + File dir = new File(TEST_COMPARE_DIR + "/gobbling"); + File[] directoryListing = dir.listFiles(); + if (directoryListing != null) { - @Override - public Float convert(Object o) + for (File child : directoryListing) { - return 4.5f; + if (child.isFile()) + { + testTemplate(ve, child.getName(), mode); + } } - }); - VelocityContext context = new VelocityContext(); - context.put("obj", new Obj()); - Writer writer = new StringWriter(); - ve.evaluate(context, writer, "test", "$obj.integralFloat($obj) / $obj.objectFloat($obj)"); - assertEquals("float ok: 4.5 / Float ok: 4.5", writer.toString()); + } + else + { + throw new Exception("cannot read input templates"); + } } - /** - * Test conversions - * @param ve - * @param templateFile template - * @param outputBaseFileName - * @throws Exception - */ - private void testConversions(VelocityEngine ve, String templateFile, String outputBaseFileName) - throws Exception + private void testTemplate(VelocityEngine engine, String templateFile, SpaceGobbling mode) throws Exception { assureResultsDirectoryExists(RESULT_DIR); - - FileOutputStream fos = new FileOutputStream (getFileName( - RESULT_DIR, outputBaseFileName, RESULT_FILE_EXT)); - - VelocityContext context = createContext(); - + FileOutputStream fos = new FileOutputStream (getFileName(RESULT_DIR, templateFile, mode.toString())); + VelocityContext context = new VelocityContext(); Writer writer = new BufferedWriter(new OutputStreamWriter(fos)); - Template template = ve.getTemplate(templateFile); + Template template = engine.getTemplate(templateFile); template.merge(context, writer); /** @@ -158,156 +123,19 @@ public class ConversionHandlerTestCase e writer.flush(); writer.close(); - if (!isMatch(RESULT_DIR, COMPARE_DIR, outputBaseFileName, - RESULT_FILE_EXT,CMP_FILE_EXT)) + if (false)//!isMatch(RESULT_DIR, COMPARE_DIR, templateFile, mode.toString(), mode.toString())) { - String result = getFileContents(RESULT_DIR, outputBaseFileName, RESULT_FILE_EXT); - String compare = getFileContents(COMPARE_DIR, outputBaseFileName, CMP_FILE_EXT); + String result = getFileContents(RESULT_DIR, templateFile, mode.toString()); + String compare = getFileContents(COMPARE_DIR, templateFile, mode.toString()); String msg = "Processed template did not match expected output\n"+ - "-----Result-----\n"+ result + - "----Expected----\n"+ compare + - "----------------"; - - fail(msg); - } - } + "-----Result-----\n"+ result + + "----Expected----\n"+ compare + + "----------------"; - /** - * Return and initialize engine - * @return - */ - private VelocityEngine createEngine(boolean withConversionsHandler) - throws Exception - { - VelocityEngine ve = new VelocityEngine(); - ve.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE); - ve.setProperty(Velocity.RUNTIME_LOG_INSTANCE, log); - ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); - ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/conversion"); - if (withConversionsHandler) - { - ve.setProperty(RuntimeConstants.EVENTHANDLER_METHODEXCEPTION, PrintException.class.getName()); - } - else - { - ve.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, "none"); - } - ve.init(); - - return ve; - } - - public static class PrintException implements MethodExceptionEventHandler - { - public Object methodException(Class claz, - String method, - Exception e, - Info info) - { - return method + " -> " + e.getClass().getSimpleName() + ": " + e.getMessage(); + fail(msg); } - } - - private VelocityContext createContext() - { - VelocityContext context = new VelocityContext(); - Map<String, Object> map = new TreeMap<String, Object>(); - map.put("A. bool-true", true); - map.put("B. bool-false", false); - map.put("C. byte-0", (byte)0); - map.put("D. byte-1", (byte)1); - map.put("E. short", (short)125); - map.put("F. int", 24323); - map.put("G. long", 5235235L); - map.put("H. float", 34523.345f); - map.put("I. double", 54235.3253d); - map.put("J. char", '@'); - map.put("K. object", new Obj()); - map.put("L. enum", Obj.Color.GREEN); - map.put("M. string", new String("foo")); - map.put("M. string-green", new String("green")); - map.put("N. string-empty", new String()); - map.put("O. string-false", new String("false")); - map.put("P. string-true", new String("true")); - map.put("Q. string-zero", new String("0")); - map.put("R. string-integral", new String("123")); - map.put("S. string-big-integral", new String("12345678")); - map.put("T. string-floating", new String("123.345")); - map.put("U. null", null); - context.put("map", map); - context.put("target", new Obj()); - Class[] types = - { - Boolean.TYPE, - Character.TYPE, - Byte.TYPE, - Short.TYPE, - Integer.TYPE, - Long.TYPE, - Float.TYPE, - Double.TYPE, - Boolean.class, - Character.class, - Byte.class, - Short.class, - Integer.class, - Long.class, - Float.class, - Double.class, - Object.class - }; - context.put("types", types); - context.put("introspect", new Introspect()); - return context; - } - - public static class Obj - { - public enum Color { RED, GREEN }; - - public String integralBoolean(boolean b) { return "boolean ok: " + b; } - public String integralByte(byte b) { return "byte ok: " + b; } - public String integralShort(short s) { return "short ok: " + s; } - public String integralInt(int i) { return "int ok: " + i; } - public String integralLong(long l) { return "long ok: " + l; } - public String integralFloat(float f) { return "float ok: " + f; } - public String integralDouble(double d) { return "double ok: " + d; } - public String integralChar(char c) { return "char ok: " + c; } - public String objectBoolean(Boolean b) { return "Boolean ok: " + b; } - public String objectByte(Byte b) { return "Byte ok: " + b; } - public String objectShort(Short s) { return "Short ok: " + s; } - public String objectInt(Integer i) { return "Integer ok: " + i; } - public String objectLong(Long l) { return "Long ok: " + l; } - public String objectFloat(Float f) { return "Float ok: " + f; } - public String objectDouble(Double d) { return "Double ok: " + d; } - public String objectCharacter(Character c) { return "Character ok: " + c; } - public String objectNumber(Number b) { return "Number ok: " + b; } - public String objectObject(Object o) { return "Object ok: " + o; } - public String objectString(String s) { return "String ok: " + s; } - public String objectEnum(Color c) { return "Enum ok: " + c; } - public String toString() { return "instance of Obj"; } - } - - public static class Introspect - { - private ConversionHandler handler; - public Introspect() - { - handler = new ConversionHandlerImpl(); - } - public boolean isStrictlyConvertible(Class expected, Class provided) - { - return IntrospectionUtils.isStrictMethodInvocationConvertible(expected, provided, false); - } - public boolean isImplicitlyConvertible(Class expected, Class provided) - { - return IntrospectionUtils.isMethodInvocationConvertible(expected, provided, false); - } - public boolean isExplicitlyConvertible(Class expected, Class provided) - { - return handler.isExplicitlyConvertible(expected, provided, false); - } } } +
Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TemplateTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TemplateTestCase.java?rev=1758416&r1=1758415&r2=1758416&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TemplateTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TemplateTestCase.java Tue Aug 30 16:18:33 2016 @@ -112,6 +112,8 @@ public class TemplateTestCase extends Ba Velocity.setProperty( Velocity.RUNTIME_LOG_INSTANCE, new TestLogger()); + Velocity.setProperty("space.gobbling", "bc"); + Velocity.init(); provider = new TestProvider(); Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java?rev=1758416&r1=1758415&r2=1758416&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java Tue Aug 30 16:18:33 2016 @@ -38,6 +38,7 @@ public class Velocity615TestCase extends engine.setProperty("velocimacro.permissions.allow.inline.to.replace.global", "false"); engine.setProperty("velocimacro.permissions.allow.inline.local.scope", "true"); engine.setProperty("velocimacro.arguments.strict", "true"); + engine.setProperty("space.gobbling", "bc"); } public void testIt() Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java?rev=1758416&r1=1758415&r2=1758416&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java Tue Aug 30 16:18:33 2016 @@ -30,7 +30,14 @@ public class Velocity631TestCase extends { super(name); } - + + public void setUp() throws Exception + { + super.setUp(); + engine.setProperty("space.gobbling", "bc"); + } + + public void test631() { assertEvalEquals("$a", "$a #set($b = 1)"); Modified: velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp?rev=1758416&r1=1758415&r2=1758416&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/conversion/compare/matrix.cmp Tue Aug 30 16:18:33 2016 @@ -43,1553 +43,1553 @@ </tr> <tr> <th>formal: boolean</th> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: char</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: byte</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: short</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: int</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: long</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: float</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: double</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> </td> - </tr> + <td> </td> + </tr> <tr> <th>formal: class java.lang.Boolean</th> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Character</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Byte</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Short</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Integer</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Long</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Float</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> true </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Double</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> <tr> <th>formal: class java.lang.Object</th> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> false<br/> false<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - <td> + <td> true<br/> true<br/> false </td> - </tr> + </tr> </thead> <tbody> </tbody> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.BC Tue Aug 30 16:18:33 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_smart.vtl.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,36 @@ +<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_smart.vtl.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.SMART Tue Aug 30 16:18:33 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_smart.vtl.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_smart.vtl.STRUCTURED Tue Aug 30 16:18:33 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.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.BC Tue Aug 30 16:18:33 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.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,36 @@ +<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.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.SMART Tue Aug 30 16:18:33 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.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/foreach_structured.vtl.STRUCTURED Tue Aug 30 16:18:33 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.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.BC Tue Aug 30 16:18:33 2016 @@ -0,0 +1,59 @@ +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 + \ No newline at end of file Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,240 @@ + + +y + y +y +y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/if.vtl.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.SMART Tue Aug 30 16:18:33 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/if.vtl.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/if.vtl.STRUCTURED Tue Aug 30 16:18:33 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.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.BC Tue Aug 30 16:18:33 2016 @@ -0,0 +1,20 @@ + + + + + +<a> + <b> + line1 line2 line3 + line4 + block foo + </b> +</a> + +<a> + <b> + line1 line2 line3 + line4 + block foo + </b> +</a> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,43 @@ + + + + + + + + + + +<a> + <b> + + line1 + +line2 + line3 + + +line4 + + +block foo + + </b> +</a> + +<a> + <b> + + line1 + +line2 + line3 + + +line4 + + +block foo + + </b> +</a> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.SMART Tue Aug 30 16:18:33 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/macro.vtl.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/macro.vtl.STRUCTURED Tue Aug 30 16:18:33 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.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.BC Tue Aug 30 16:18:33 2016 @@ -0,0 +1,3 @@ + postfix + postfix +prefix prefix postfix Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,6 @@ + + + postfix + postfix +prefix +prefix postfix Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.SMART Tue Aug 30 16:18:33 2016 @@ -0,0 +1,3 @@ + postfix + postfix +prefix prefix postfix Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/set.vtl.STRUCTURED Tue Aug 30 16:18:33 2016 @@ -0,0 +1,3 @@ + postfix + postfix +prefix prefix postfix Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.BC URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.BC?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.BC (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.BC Tue Aug 30 16:18:33 2016 @@ -0,0 +1,7 @@ +<table> + <tr> + <td> + blabla + </td> + </tr> + </table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.NONE URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.NONE?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.NONE (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.NONE Tue Aug 30 16:18:33 2016 @@ -0,0 +1,11 @@ +<table> + + <tr> + + <td> + blabla + </td> + + </tr> + +</table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.SMART URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.SMART?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.SMART (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.SMART Tue Aug 30 16:18:33 2016 @@ -0,0 +1,7 @@ +<table> + <tr> + <td> + blabla + </td> + </tr> +</table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.STRUCTURED URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.STRUCTURED?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.STRUCTURED (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/compare/structured.vtl.STRUCTURED Tue Aug 30 16:18:33 2016 @@ -0,0 +1,7 @@ +<table> + <tr> + <td> + blabla + </td> + </tr> +</table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_smart.vtl URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_smart.vtl?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_smart.vtl (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_smart.vtl Tue Aug 30 16:18:33 2016 @@ -0,0 +1,19 @@ +<table> + <tbody> +#foreach($row in [1..2]) + <tr> + #foreach($col in [1..2]) + <td> + #if( $row == 1 && $col == 1) + first cell + #elseif( $row == 2 && $coll == 2) + last cell + #else + middle cell + #end + </td> + #end + </tr> +#end + </tbody> +</table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_structured.vtl URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_structured.vtl?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_structured.vtl (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/foreach_structured.vtl Tue Aug 30 16:18:33 2016 @@ -0,0 +1,19 @@ +<table> + <tbody> + #foreach($row in [1..2]) + <tr> + #foreach($col in [1..2]) + <td> + #if( $row == 1 && $col == 1) + first cell + #elseif( $row == 2 && $coll == 2) + last cell + #else + middle cell + #end + </td> + #end + </tr> + #end + </tbody> +</table> Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/if.vtl URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/if.vtl?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/if.vtl (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/if.vtl Tue Aug 30 16:18:33 2016 @@ -0,0 +1,648 @@ +#if($bogus == "bar")x#end +#if($bogus == "bar")x #end +#if($bogus == "bar")x#{else}y#end +#if($bogus == "bar")x#else y#end +#if($bogus == "bar")x #{else}y#end +#if($bogus == "bar")x #{else}y #end +#if($bogus == "bar")x#elseif($bogus == "foo")y#end +#if($bogus == "bar")x#elseif($bogus == "foo")y #end +#if($bogus == "bar")x #elseif($bogus == "foo")y#end +#if($bogus == "bar")x #elseif($bogus == "foo")y #end +#if($bogus == "bar")x#elseif($bogus == "foo")y#{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y#{else} #end +#if($bogus == "bar")x#elseif($bogus == "foo")y #{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y #{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y#{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y#{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y #{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y #{else} #end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo")#end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo") #end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo")#end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo") #end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo")#end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo") #end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo")#end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo") #end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo")#{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo")#{else} #end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo") #{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y#elseif($bogus == "schmoo") #{else} #end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo")#{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo")#{else} #end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo") #{else}#end +#if($bogus == "bar")x#elseif($bogus == "foo")y #elseif($bogus == "schmoo") #{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo")#{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo")#{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo") #{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y#elseif($bogus == "schmoo") #{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo")#{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo")#{else} #end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo") #{else}#end +#if($bogus == "bar")x #elseif($bogus == "foo")y #elseif($bogus == "schmoo") #{else} #end + +#if($bogus == "bar") + x +#end +#if($bogus == "bar") + x +#end +#if($bogus == "bar") + x +#else + y +#end +#if($bogus == "bar") + x +#{else} + y +#end +#if($bogus == "bar") + x +#else + y +#end +#if($bogus == "bar") + x +#{else} + y +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#else + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#{else} + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#else + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#{else} + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#else + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#{else} + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#else + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#{else} + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#else + t +#end +#if($bogus == "bar") + x +#elseif($bogus == "foo") + y +#elseif($bogus == "schmoo") + z +#{else} + t +#end + + #if($bogus == "bar") + x + #end + #if($bogus == "bar") + x + #end + #if($bogus == "bar") + x + #else + y + #end + #if($bogus == "bar") + x + #{else} + y + #end + #if($bogus == "bar") + x + #else + y + #end + #if($bogus == "bar") + x + #{else} + y + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #else + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #{else} + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #else + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #{else} + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #else + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #{else} + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #else + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #{else} + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #else + t + #end + #if($bogus == "bar") + x + #elseif($bogus == "foo") + y + #elseif($bogus == "schmoo") + z + #{else} + t + #end Added: velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/macro.vtl URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/macro.vtl?rev=1758416&view=auto ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/macro.vtl (added) +++ velocity/engine/trunk/velocity-engine-core/src/test/resources/gobbling/macro.vtl Tue Aug 30 16:18:33 2016 @@ -0,0 +1,41 @@ +#macro(line1)line1#end + +#macro(line2) +line2#end + +#macro(line3)line3 +#end + +#macro(line4) +line4 +#end + +#macro(block) +block $bodyContent +#end + +## lines +<a> + <b> +#if(true) + #line1() + #line2() + #line3() + #line4() + #@block()foo#end +#end + </b> +</a> + +## structured +<a> + <b> + #if(true) + #line1() + #line2() + #line3() + #line4() + #@block()foo#end + #end + </b> +</a>
