Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; @@ -48,23 +48,23 @@ extends TestCase // @@ VELOCITY-553 public class TestObject { private String nullValueAttribute = null; - + public String getNullValueAttribute() { return nullValueAttribute; - } + } public String getRealString() { return new String("helloFooRealStr"); - } - + } + public String getString() { return new String("helloFoo"); } public String getNullString() { return null; - } - + } + public java.util.Date getNullDate() { return null; } @@ -80,7 +80,7 @@ extends TestCase } // @@ VELOCITY-553 - + /** * Default constructor. */ @@ -88,39 +88,39 @@ extends TestCase { super(name); } - + public static Test suite () { return new TestSuite(InvalidEventHandlerTestCase.class); } - + public void testManualEventHandlers() throws Exception { TestEventCartridge te = new TestEventCartridge(); - + /** * Test attaching the event cartridge to the context */ VelocityEngine ve = new VelocityEngine(); ve.init(); - + /* * lets make a Context and add the event cartridge */ - + VelocityContext inner = new VelocityContext(); - + /* * Now make an event cartridge, register all the * event handlers (at once) and attach it to the * Context */ - + EventCartridge ec = new EventCartridge(); ec.addEventHandler(te); ec.attachToContext( inner ); - + doTestInvalidReferenceEventHandler0(ve, inner); doTestInvalidReferenceEventHandler1(ve, inner); doTestInvalidReferenceEventHandler2(ve, inner); @@ -162,22 +162,22 @@ extends TestCase Tree test2 = new Tree(); test2.setField("12"); test.setChild(test2); - + context.put("tree",test); String s; Writer w; - + // show work fine s = "$tree.Field $tree.field $tree.child.Field"; w = new StringWriter(); ve.evaluate(context, w, "mystring", s); - + s = "$tree.x $tree.field.x $tree.child.y $tree.child.Field.y"; w = new StringWriter(); ve.evaluate(context, w, "mystring", s); - + } - + /** * Test invalid #set * @param ve @@ -191,10 +191,10 @@ extends TestCase context.put("a1", new Integer(5)); context.put("a4", new Integer(5)); context.put("b1","abc"); - + String s; Writer w; - + // good object, bad right hand side s = "#set($xx = $a1.afternoon())"; w = new StringWriter(); @@ -202,7 +202,7 @@ extends TestCase ve.evaluate( context, w, "mystring", s ); fail("Expected exception."); } catch (RuntimeException e) {} - + // good object, bad right hand reference s = "#set($yy = $q1)"; w = new StringWriter(); @@ -210,7 +210,7 @@ extends TestCase ve.evaluate( context, w, "mystring", s ); fail("Expected exception."); } catch (RuntimeException e) {} - + } /** @@ -226,10 +226,10 @@ extends TestCase context.put("a1",new Integer(5)); context.put("a4",new Integer(5)); context.put("b1","abc"); - + String s; Writer w; - + // good object, bad method s = "$a1.afternoon()"; w = new StringWriter(); @@ -262,9 +262,9 @@ extends TestCase s = "$b1.baby()"; w = new StringWriter(); ve.evaluate( context, w, "mystring", s ); - assertEquals("www",w.toString()); + assertEquals("www",w.toString()); } - + /** * Test invalid gets/references * @param ve @@ -275,17 +275,17 @@ extends TestCase throws Exception { String result; - + VelocityContext context = new VelocityContext(vc); context.put("a1",new Integer(5)); context.put("a4",new Integer(5)); context.put("b1","abc"); - + // normal - should be no calls to handler String s = "$a1 $a1.intValue() $b1 $b1.length() #set($c1 = '5')"; Writer w = new StringWriter(); ve.evaluate(context, w, "mystring", s); - + // good object, bad property s = "$a1.foobar"; w = new StringWriter(); @@ -307,7 +307,7 @@ extends TestCase assertEquals("no",w.toString()); - // bad object, bad property + // bad object, bad property s = "$a2.foobar"; w = new StringWriter(); try { @@ -335,7 +335,7 @@ extends TestCase ve.evaluate( context, w, "mystring", s ); assertEquals("no", w.toString()); - // bad object, no property + // bad object, no property s = "$a3"; w = new StringWriter(); try { @@ -363,7 +363,7 @@ extends TestCase ve.evaluate( context, w, "mystring", s ); result = w.toString(); assertEquals("zzz", result); - + } /** @@ -458,17 +458,17 @@ extends TestCase /** * Test assigning the event handlers via properties */ - + public static class TestEventCartridge implements InvalidReferenceEventHandler, RuntimeServicesAware { private RuntimeServices rs; - + public TestEventCartridge() { } - + /** * Required by EventHandler */ @@ -477,18 +477,18 @@ extends TestCase // make sure this is only called once if (this.rs == null) this.rs = rs; - + else fail("initialize called more than once."); } - - + + public Object invalidGetMethod(Context context, String reference, Object object, String property, Info info) { // as a test, make sure this EventHandler is initialized if (rs == null) fail ("Event handler not initialized!"); - + // good object, bad property if (reference.equals("$a1.foobar")) { @@ -496,23 +496,23 @@ extends TestCase assertEquals("foobar",property); throw new RuntimeException("expected exception"); } - - // bad object, bad property + + // bad object, bad property else if (reference.equals("$a2")) { assertNull(object); assertNull(property); throw new RuntimeException("expected exception"); } - - // bad object, no property + + // bad object, no property else if (reference.equals("$a3")) { assertNull(object); assertNull(property); throw new RuntimeException("expected exception"); } - + // good object, bad property; change the value else if (reference.equals("$a4.foobar")) { @@ -535,7 +535,7 @@ extends TestCase } - + else if (reference.equals("$tree.x")) { assertEquals("x",property); @@ -550,19 +550,19 @@ extends TestCase { assertEquals("y",property); } - + else if (reference.equals("$tree.child.Field.y")) { assertEquals("y",property); } - + else { fail("invalidGetMethod: unexpected reference: " + reference); } return null; } - + public Object invalidMethod(Context context, String reference, Object object, String method, Info info) { // as a test, make sure this EventHandler is initialized @@ -583,13 +583,13 @@ extends TestCase } else - { + { fail("Unexpected invalid method. " + method); } return null; - } - + } + public boolean invalidSetMethod(Context context, String leftreference, String rightreference, Info info) { @@ -610,10 +610,10 @@ extends TestCase throw new RuntimeException("expected exception"); } else - { + { fail("Unexpected left hand side. " + leftreference); } - + return false; } @@ -623,10 +623,10 @@ extends TestCase { String field; Tree child; - + public Tree() { - + } public String getField() @@ -649,10 +649,10 @@ extends TestCase this.child = child; } - public String testMethod() + public String testMethod() { return "123"; } } - + }
Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext; @@ -66,7 +66,7 @@ public class MacroAutoReloadTestCase ext context = new VelocityContext(); } - + public void testChangedMacro() throws Exception { String template = "#foo('hip')"; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.ParseErrorException; @@ -35,7 +35,7 @@ public class MacroCommentsTestCase exten { super.setUp(); } - + public void testComments() { assertEvalEquals("ab","#macro(foo ##\n $bar \n ## blaa\n $bar2##\n)$bar$bar2#end#foo(\"a\" \"b\")"); @@ -44,7 +44,7 @@ public class MacroCommentsTestCase exten assertEvalEquals("","#macro(foo4 ## test\n ## test2 ## test3 \n)#end#foo4()"); assertEvalEquals("","#macro(foo4 ## test\n $x = 5 ## test2 ## test3 \n)#end#foo4()"); } - + public void testErrors() { // We only allow comment lines in macro definitions Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.RuntimeConstants; @@ -52,7 +52,7 @@ public class MacroDefaultArgTestCase ext assertEvalEquals("3 2 5 2 5 [1, 2] ", "#macro(foo, $a=$x $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])"); assertEvalEquals("{a=3} 2 5 2 5 [1, 2] ", "#macro(foo, $a = {\"a\":$x} $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])"); - + assertEvalEquals("3 2 5 2 5 [1, 2] ", "#macro(foo, $a = \"$x\" $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])"); assertEvalEquals("3$y 2 5 2 5 [1, 2] ", "#macro(foo, $a = \"$x\\$y\" $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])"); assertEvalEquals("5 3 2 5 [1, 2] 2 ", "#macro(foo, $c $a = \"$x\" $b =2 )$c $a $b #end#set($x=3)#foo(5)#foo(5 [1,2])"); @@ -61,7 +61,7 @@ public class MacroDefaultArgTestCase ext assertEvalEquals("xy", "#macro(foo $a=\"$b$c\"##\n)$a#end#set($b=\"x\")#set($c=\"y\")#foo()"); } - + public void testErrors() { assertEvalException("#macro(foo $a = 1 $b)#end"); Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.TestCase; @@ -29,60 +29,60 @@ import org.apache.velocity.runtime.parse * @author <a href="Will Glass-Husain">wgl...@forio.com</a> * @version $Id$ */ -public class MethodCacheKeyTestCase extends TestCase +public class MethodCacheKeyTestCase extends TestCase { - + public void testMethodKeyCacheEquals() { Class [] elements1 = new Class [] { Object.class }; ASTMethod.MethodCacheKey mck1 = new ASTMethod.MethodCacheKey("test",elements1); - + selfEqualsAssertions(mck1); - + Class [] elements2 = new Class [] { Object.class }; ASTMethod.MethodCacheKey mck2 = new ASTMethod.MethodCacheKey("test",elements2); - + assertTrue(mck1.equals(mck2)); - + Class [] elements3 = new Class [] { String.class }; ASTMethod.MethodCacheKey mck3 = new ASTMethod.MethodCacheKey("test",elements3); - + assertFalse(mck1.equals(mck3)); - + Class [] elements4 = new Class [] { Object.class }; ASTMethod.MethodCacheKey mck4 = new ASTMethod.MethodCacheKey("boo",elements4); - + assertFalse(mck1.equals(mck4)); - + /** check for potential NPE's **/ Class [] elements5 = ArrayUtils.EMPTY_CLASS_ARRAY; ASTMethod.MethodCacheKey mck5 = new ASTMethod.MethodCacheKey("boo",elements5); selfEqualsAssertions(mck5); - + Class [] elements6 = null; ASTMethod.MethodCacheKey mck6 = new ASTMethod.MethodCacheKey("boo",elements6); selfEqualsAssertions(mck6); - + Class [] elements7 = new Class [] {}; ASTMethod.MethodCacheKey mck7 = new ASTMethod.MethodCacheKey("boo",elements7); selfEqualsAssertions(mck7); - + Class [] elements8 = new Class [] {null}; ASTMethod.MethodCacheKey mck8 = new ASTMethod.MethodCacheKey("boo",elements8); - selfEqualsAssertions(mck8); - + selfEqualsAssertions(mck8); + Class [] elements9 = new Class [] { Object.class }; ASTMethod.MethodCacheKey mck9 = new ASTMethod.MethodCacheKey("boo",elements9); - selfEqualsAssertions(mck9); - + selfEqualsAssertions(mck9); + } - + private void selfEqualsAssertions(ASTMethod.MethodCacheKey mck) { assertTrue(mck.equals(mck)); assertTrue(!mck.equals(null)); assertTrue(!mck.equals((ASTMethod.MethodCacheKey) null)); } - - + + } Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; @@ -34,17 +34,17 @@ import java.io.OutputStreamWriter; import java.io.Writer; /** - * Test a reported bug in which method overloading throws IllegalArgumentException + * Test a reported bug in which method overloading throws IllegalArgumentException * after a null return value. * (VELOCITY-132). - * + * * @author <a href="mailto:wgl...@forio.com">Will Glass-Husain</a> * @version $Id$ */ public class MethodOverloadingTestCase extends BaseTestCase { String logData; - + /** * VTL file extension. */ @@ -112,11 +112,11 @@ public class MethodOverloadingTestCase e * test overloading in a file included with #parse */ testFile("main"); - + assertTrue(logData.indexOf("IllegalArgumentException") == -1); - + } - + public void testFile(String basefilename) throws Exception { @@ -125,19 +125,19 @@ public class MethodOverloadingTestCase e ve.addProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, FILE_RESOURCE_LOADER_PATH); ve.setProperty(VelocityEngine.RUNTIME_LOG_INSTANCE, logger ); ve.init(); - + Template template; FileOutputStream fos; Writer fwriter; Context context; - + template = ve.getTemplate( getFileName(null, basefilename, TMPL_FILE_EXT) ); - + fos = new FileOutputStream ( getFileName(RESULTS_DIR, basefilename, RESULT_FILE_EXT)); - + fwriter = new BufferedWriter( new OutputStreamWriter(fos) ); - + context = new VelocityContext(); setupContext(context); logger.on(); @@ -145,37 +145,37 @@ public class MethodOverloadingTestCase e logger.off(); fwriter.flush(); fwriter.close(); - + if (!isMatch(RESULTS_DIR, COMPARE_DIR, basefilename, RESULT_FILE_EXT, CMP_FILE_EXT)) { fail("Output incorrect."); } logData = logger.getLog(); } - + public void setupContext(Context context) { context.put("test", this); - context.put("nullValue", null); - } - - + context.put("nullValue", null); + } + + public String overloadedMethod ( Integer s ) { return "Integer"; } - + public String overloadedMethod ( String s ) { return "String"; } - - + + public String overloadedMethod2 ( Integer s ) { return "Integer"; } - + public String overloadedMethod2 ( String i ) { return "String"; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; @@ -53,7 +53,7 @@ public class MiscTestCase extends BaseTe ri.setProperty("baabaa.test","the answer"); assertEquals("the answer",ri.getProperty("baabaa.test")); } - + public void testStringUtils() { /* Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; @@ -139,5 +139,3 @@ public class NumberMethodCallsTestCase e } - - Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java Thu Jan 26 01:57:00 2017 @@ -59,7 +59,7 @@ public class ParseWithMacroLibsTestCase { return new TestSuite(ParseWithMacroLibsTestCase.class); } - + public void testParseMacroLocalCacheOn() throws Exception { @@ -71,7 +71,7 @@ public class ParseWithMacroLibsTestCase // render twice to make sure there is no difference with cached templates testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false); testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false); - + // run again with different macro library testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false); testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false); @@ -110,7 +110,7 @@ public class ParseWithMacroLibsTestCase testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false); testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false); } - + public void testParseMacroGlobalCacheOff() throws Exception { @@ -120,12 +120,12 @@ public class ParseWithMacroLibsTestCase VelocityEngine ve = createEngine(false, false); testParseMacro(ve, "vm_library1.vm", "parseMacro1_4", true); - + // run again with different macro library testParseMacro(ve, "vm_library2.vm", "parseMacro1_4b", true); } - + /** * Test #parse with macros. Can be used to test different engine configurations * @param ve @@ -165,7 +165,7 @@ public class ParseWithMacroLibsTestCase "-----Result-----\n"+ result + "----Expected----\n"+ compare + "----------------"; - + fail(msg); } @@ -199,11 +199,11 @@ public class ParseWithMacroLibsTestCase ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/parsemacros"); ve.init(); - + return ve; } - - + + /** * Test whether the literal text is given if a definition cannot be * found for a macro. @@ -217,7 +217,7 @@ public class ParseWithMacroLibsTestCase * ve1: local scope, cache on */ VelocityEngine ve1 = new VelocityEngine(); - + ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE); ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global", Boolean.FALSE); @@ -228,7 +228,7 @@ public class ParseWithMacroLibsTestCase ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/parsemacros"); ve1.init(); - + assureResultsDirectoryExists(RESULT_DIR); FileOutputStream fos = new FileOutputStream (getFileName( @@ -267,7 +267,7 @@ public class ParseWithMacroLibsTestCase * ve1: local scope, cache on */ VelocityEngine ve1 = new VelocityEngine(); - + ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE); ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global", Boolean.FALSE); @@ -278,7 +278,7 @@ public class ParseWithMacroLibsTestCase ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, TEST_COMPARE_DIR + "/parsemacros"); ve1.init(); - + assureResultsDirectoryExists(RESULT_DIR); FileOutputStream fos = new FileOutputStream (getFileName( Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext; @@ -100,5 +100,3 @@ public class PropertyMethodPrecedenceTes } } - - Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java Thu Jan 26 01:57:00 2017 @@ -45,8 +45,8 @@ public class RenderVelocityTemplateTest return stringWriter.toString(); } } - - + + private static final String templateString = "" + // "#macro (showhelloworld $foo)\n" + // "Hello, World\n" + // @@ -61,7 +61,7 @@ public class RenderVelocityTemplateTest "<p>#showhelloworld ($foo)</p>\n" + // "</body>\n" + // "</html>"; - + public void testMultipleEvals() throws Exception { @@ -71,18 +71,18 @@ public class RenderVelocityTemplateTest for (int i = 0; i < 1000; ++i) { result = template.getContent(); - + // Verify that the original macro invocation has been replaced with its result. int index = result.indexOf("#showhelloworld"); if (index != -1) { throw new AssertionError("Failed to substitute macro:\n" + result); } - + // Verify that the macro did indeed expand. int indexHW = result.indexOf("<p>Hello, World"); Assert.assertTrue(indexHW >= 0); - + // Assert.assertEquals("", result); // enable to show what we really get } } @@ -138,7 +138,7 @@ public class RenderVelocityTemplateTest { t.start(); } - + for (Thread t : threads) { t.join(); Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.VelocityEngine; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.VelocityEngine; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; @@ -141,4 +141,3 @@ public class SetTestCase extends BaseTes assertEvalEquals("","#set($b = !$a)"); } } - Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.VelocityException; @@ -52,7 +52,7 @@ public class StrictCompareTestCase exten assertVelocityEx("#if($NULL > $a)#end"); assertVelocityEx("#if($NULL < $a)#end"); - assertVelocityEx("#if($NULL >= $a)#end"); + assertVelocityEx("#if($NULL >= $a)#end"); assertVelocityEx("#if($NULL <= $a)#end"); assertVelocityEx("#if($NULL >= $NULL)#end"); @@ -62,9 +62,9 @@ public class StrictCompareTestCase exten assertVelocityEx("#if($a < $b)#end"); assertVelocityEx("#if($a < 5)#end"); - assertVelocityEx("#if($a > 5)#end"); + assertVelocityEx("#if($a > 5)#end"); } - + /** * Assert that we get a VelocityException when calling evaluate */ Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java Thu Jan 26 01:57:00 2017 @@ -15,7 +15,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.RuntimeConstants; @@ -40,14 +40,14 @@ public class StrictEscapeTestCase extend context.put("animal", new Animal()); // DEBUG = true; } - + public void testReferenceEscape() { engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE); assertEvalException("\\\\$bogus"); assertEvalException("\\\\\\\\$bogus"); - + assertEvalEquals("$bogus", "\\$bogus"); assertEvalEquals("$bogus.xyz", "\\$bogus.xyz"); assertEvalEquals("${bogus}", "\\${bogus}"); @@ -59,18 +59,18 @@ public class StrictEscapeTestCase extend assertEvalEquals("$pow", "#set($foo = \"\\$pow\")$foo"); assertEvalEquals("\\bang", "#set($foo = \"\\\\$pow\")$foo"); assertEvalEquals("\\$pow", "#set($foo = \"\\\\\\$pow\")$foo"); - + assertEvalEquals("\\$%", "\\$%"); - + // This should work but does not... may be related to VELOCITY-679 // This is broken from existing escape behavior // assertEvalEquals("\\$bang", "\\$$pow"); - + assertEvalEquals("$!foo", "#set($foo = $NULL)\\$!foo"); assertEvalEquals("$!animal.null", "\\$!animal.null"); assertEvalEquals("$!animal", "\\$!animal"); - } - + } + public void testMacroEscape() { engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE); @@ -78,15 +78,15 @@ public class StrictEscapeTestCase extend // define the foo macro assertEvalEquals("", "#macro(foo)bar#end"); - + assertEvalEquals("#foo()", "\\#foo()"); assertEvalEquals("\\bar", "\\\\#foo()"); assertEvalEquals("\\#foo()", "\\\\\\#foo()"); - + assertEvalEquals("bar", "#set($abc = \"#foo()\")$abc"); assertEvalEquals("#foo()", "#set($abc = \"\\#foo()\")$abc"); assertEvalEquals("\\bar", "#set($abc = \"\\\\#foo()\")$abc"); - + assertEvalEquals("#@foo()", "\\#@foo()"); assertEvalEquals("#@foo", "\\#@foo"); assertEvalEquals("#@bar", "\\#@bar"); @@ -94,14 +94,14 @@ public class StrictEscapeTestCase extend assertEvalEquals("#@foo()#end", "\\#@foo()\\#end"); assertEvalEquals("#@foo#end", "\\#@foo\\#end"); assertEvalEquals("#@bar #end", "\\#@bar \\#end"); - + assertEvalEquals("#end #foreach #define() #elseif", "\\#end \\#foreach \\#define() \\#elseif"); assertEvalEquals("#{end} #{foreach} #{define}() #{elseif}", "\\#{end} \\#{foreach} \\#{define}() \\#{elseif}"); assertEvalEquals("#macro(foo) #end", "\\#macro(foo) \\#end"); - + assertEvalException("\\\\#end"); assertEvalException("\\\\#if()"); - + // This should work but does not, probably related to VELOCITY-678 // this is broken from existing behavior //assertEvalEquals("\\$bar", "\\$#foo()"); @@ -114,22 +114,22 @@ public class StrictEscapeTestCase extend { assertEvalEquals("#bogus()", "\\#bogus()"); assertEvalEquals("\\#bogus", "\\\\#bogus"); - + assertEvalEquals("\\$bogus", "\\\\$bogus"); assertEvalEquals("\\\\$bogus", "\\\\\\\\$bogus"); - assertEvalEquals("\\$bogus", "#set($foo = \"\\\\$bogus\")$foo"); + assertEvalEquals("\\$bogus", "#set($foo = \"\\\\$bogus\")$foo"); } /** * Test object for escaping */ public static class Animal - { + { public Object getNull() { return null; } - + public String toString() { return null; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.VelocityException; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.MathException; @@ -53,7 +53,7 @@ public class StrictMathTestCase extends String infinity = "#set( $foo = $num "+operation+" $zero )"; assertEvalException(infinity, MathException.class); } - + public void testAdd() { Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.VelocityEngine; @@ -57,7 +57,7 @@ public class StrictReferenceTestCase ext context.put("bar", null); context.put("TRUE", Boolean.TRUE); } - + /** * Test the modified behavior of #if in strict mode. Mainly, that * single variables references in #if statements use non strict rules @@ -81,9 +81,9 @@ public class StrictReferenceTestCase ext assertMethodEx("#if($bogus.foo)#end"); assertMethodEx("#if(!$bogus.foo)#end"); } - - - /** + + + /** * We make sure that variables can actuall hold null * values. */ @@ -95,9 +95,9 @@ public class StrictReferenceTestCase ext assertEvalEquals("true", "#set($foobar = $NULL)#if($foobar == $NULL)true#end"); assertEvalEquals("13", "#set($list = [1, $NULL, 3])#foreach($item in $list)#if($item != $NULL)$item#end#end"); } - + /** - * Test that variables references that have not been defined throw exceptions + * Test that variables references that have not been defined throw exceptions */ public void testStrictVariableRef() throws Exception @@ -114,12 +114,12 @@ public class StrictReferenceTestCase ext assertMethodEx("#if($bogus > 1) #end"); assertMethodEx("#foreach($item in $bogus)#end"); - // make sure no exceptions are thrown here - evaluate("#set($foo = \"bar\") $foo"); + // make sure no exceptions are thrown here + evaluate("#set($foo = \"bar\") $foo"); evaluate("#macro(test1 $foo1) $foo1 #end #test1(\"junk\")"); evaluate("#macro(test2) #set($foo2 = \"bar\") $foo2 #end #test2()"); } - + /** * Test that exceptions are thrown when methods are called on * references that contains objects that do not contains those @@ -129,7 +129,7 @@ public class StrictReferenceTestCase ext { Fargo fargo = new Fargo(); fargo.next = new Fargo(); - context.put("fargo", fargo); + context.put("fargo", fargo); // Mainly want to make sure no exceptions are thrown here assertEvalEquals("propiness", "$fargo.prop"); @@ -142,7 +142,7 @@ public class StrictReferenceTestCase ext assertMethodEx("#set($fargo.next.prop = $TRUE)"); assertMethodEx("$fargo.next.setProp($TRUE)"); } - + /** * Make sure exceptions are thrown when when we attempt to call * methods on null values. @@ -178,7 +178,7 @@ public class StrictReferenceTestCase ext { assertVelocityEx("#bogus()"); assertVelocityEx("#bogus ( )"); - assertVelocityEx("#bogus( $a )"); + assertVelocityEx("#bogus( $a )"); assertVelocityEx("abc#bogus ( $a )a "); assertEvalEquals(" true ", "#macro(test1) true #end#test1()"); @@ -187,14 +187,14 @@ public class StrictReferenceTestCase ext assertEvalEquals("#F - ()", "#F - ()"); assertEvalEquals("#F{}", "#F{}"); } - - + + public void testRenderingNull() { Fargo fargo = new Fargo(); fargo.next = new Fargo(); - context.put("fargo", fargo); - + context.put("fargo", fargo); + assertVelocityEx("#set($foo = $NULL)$foo"); assertEvalEquals("", "#set($foo = $NULL)$!foo"); assertVelocityEx("$fargo.nullVal"); @@ -204,7 +204,7 @@ public class StrictReferenceTestCase ext assertVelocityEx("$fargo.next.nullVal"); assertEvalEquals("", "$!fargo.next.nullVal"); } - + /** * Assert that we get a MethodInvocationException when calling evaluate */ @@ -234,7 +234,7 @@ public class StrictReferenceTestCase ext { String prop = "propiness"; Fargo next = null; - + public String getProp() { return prop; @@ -253,6 +253,6 @@ public class StrictReferenceTestCase ext public Fargo getNext() { return next; - } - } + } + } } Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,9 +16,9 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ - + import org.apache.velocity.runtime.parser.node.ASTTextblock; /** @@ -128,7 +128,7 @@ public class TextblockTestCase extends B { assertTextblockEvalEquals("<!--#include file=\"wisdom.inc\"--> "); } - + /** * https://issues.apache.org/jira/browse/VELOCITY-676 */ Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.RuntimeConstants; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; @@ -297,7 +297,3 @@ public class UberspectorTestCase * } */ } - - - - Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext; @@ -251,5 +251,3 @@ public class VarargMethodsTestCase exten } } - - Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import junit.framework.Test; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.eventha * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.event.IncludeEventHandler; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java Thu Jan 26 01:57:00 2017 @@ -80,7 +80,7 @@ public class VelTools66TestCase { /* the testcase is obsolete in JDK 8, as SystemManager.checkMemberAccess is not anymore called * by Class.getMethods() */ - + int javaVersion = Integer.parseInt(System.getProperty("java.version").split("\\.")[1]); if (javaVersion >= 8) { Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java Thu Jan 26 01:57:00 2017 @@ -45,31 +45,31 @@ public class Velocity544TestCase { context.put("foobarTrue", new Foobar(true)); context.put("foobarFalse", new Foobar(false)); - + String template = "$foobarTrue.True $foobarFalse.True $foobarTrue.TrueObject $foobarFalse.TrueObject"; - + String result = evaluate(template); - + super.assertEquals("true false true false", result); } - + public static class Foobar { private boolean value; - + public Foobar(boolean value) { this.value = value; } - + public boolean isTrue() { return(value); } - + public Boolean isTrueObject() { return(new Boolean(value)); - } + } } } Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.ParseErrorException; 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=1780307&r1=1780306&r2=1780307&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 Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.RuntimeConstants; @@ -33,13 +33,13 @@ public class Velocity627TestCase extends { super(name); } - + public void setUp() throws Exception { super.setUp(); engine.setProperty(RuntimeConstants.SKIP_INVALID_ITERATOR, Boolean.FALSE); } - + public void test627() { // Make sure the error ouput contains "line 3, column 16" Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; @@ -31,7 +31,7 @@ public class Velocity629TestCase extends { super(name); } - + public void test629() { String template = "##\n"+ Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; 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=1780307&r1=1780306&r2=1780307&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 Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; @@ -30,7 +30,7 @@ public class Velocity667TestCase extends { super(name); } - + public void test667() { assertEvalExceptionAt("#macro", 1, 6); Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,14 +16,14 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.RuntimeConstants; import org.apache.velocity.test.BaseTestCase; /** - * This class tests VELOCITY-682. + * This class tests VELOCITY-682. */ public class Velocity682TestCase extends BaseTestCase { @@ -32,10 +32,10 @@ public class Velocity682TestCase extends super(name); //DEBUG = true; } - + public void test682() { - engine.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, Boolean.TRUE); + engine.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, Boolean.TRUE); assertEvalEquals("foo1foo2", "#macro(eval $e)#evaluate($e)#end#eval('foo1')#eval('foo2')"); } Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; @@ -43,9 +43,9 @@ public class Velocity701TestCase extends } public static abstract class Foo { - + public abstract String getBar(); - + } public void testEnum() Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.VelocityEngine; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; @@ -39,13 +39,13 @@ public class Velocity709TestCase extends System.out.println(template); assertEvalEquals("\\", template); } - + public void testEscapedDoubleQuote() { String template = "#set($foo = \"jeah \"\"baby\"\" jeah! \"\"\"\"\")$foo"; assertEvalEquals("jeah \"baby\" jeah! \"\"", template); } - + public void testEscapedSingleQuote() { String template = "#set($foo = 'jeah ''baby'' jeah!')$foo"; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.VelocityException; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.VelocityException; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; @@ -41,6 +41,6 @@ public class Velocity729TestCase extends public void testVelocity754jQueryPost() { - assertSchmoo("$.post(\"someUrl\", \"\")"); + assertSchmoo("$.post(\"someUrl\", \"\")"); } } Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.test.BaseTestCase; Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.VelocityEngine; @@ -32,7 +32,7 @@ public class Velocity742TestCase extends { super(name); } - + protected void setUpEngine(VelocityEngine engine) { // we need to call init here because otherwise it is not called until assertEvalEquals @@ -43,11 +43,11 @@ public class Velocity742TestCase extends public void testDisableAndRestoreDirective() { String s = "#include('doesnotexist.vm') directive is disabled"; - + // first remove the #include directive and see that is treated as normal text engine.removeDirective("include"); assertEvalEquals(s, s); - + // now reload the directive and see that the include directive works again and // Velocity throws ResourceNotFoundException because it can't find the template engine.loadDirective("org.apache.velocity.runtime.directive.Include"); Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.test.issues; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.VelocityContext;