You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2007/10/29 21:27:41 UTC

svn commit: r589839 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java

Author: nbubna
Date: Mon Oct 29 13:27:40 2007
New Revision: 589839

URL: http://svn.apache.org/viewvc?rev=589839&view=rev
Log:
a bit more sysout gump sleuthing

Modified:
    velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java?rev=589839&r1=589838&r2=589839&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java Mon Oct 29 13:27:40 2007
@@ -263,27 +263,37 @@
         ve.setProperty("eventhandler.escape.javascript.match", "/.*_js.*/");
         ve.init();
 
+        System.out.println("Successfully engine init()");
+
         Writer writer;
 
         // Html no JavaScript
         writer = new StringWriter();
         ve.evaluate(newEscapeContext(),writer,"test","$test1");
+        System.out.println("Escaping test1: "+writer.toString());
         assertEquals("Jimmy's <b>pizza</b>",writer.toString());
+        System.out.println("Successfully escaped test1: ");
 
         // JavaScript and HTML
         writer = new StringWriter();
         ve.evaluate(newEscapeContext(),writer,"test","$test1_js");
+        System.out.println("Escaping test1_js: "+writer.toString());
         assertEquals("Jimmy\\'s <b>pizza</b>",writer.toString());
+        System.out.println("Successfully escaped test1_js");
 
         // JavaScript and HTML
         writer = new StringWriter();
         ve.evaluate(newEscapeContext(),writer,"test","$test1_js_test");
+        System.out.println("Escaping test1_js_test: "+writer.toString());
         assertEquals("Jimmy\\'s <b>pizza</b>",writer.toString());
+        System.out.println("Successfully escaped test1_js_test");
 
         // JavaScript and HTML (method call)
         writer = new StringWriter();
         ve.evaluate(newEscapeContext(),writer,"test","$test1_js.substring(0,7)");
+        System.out.println("Escaping test1_js.substring(0,7): "+writer.toString());
         assertEquals("Jimmy\\'s",writer.toString());
+        System.out.println("Successfully escaped test1_js.substring(0,7)");
 
         System.out.println("Escape selected references (global configuration)");
 



Re: svn commit: r589839 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java

Posted by Nathan Bubna <nb...@gmail.com>.
yeah, not ideal. but everything works on my end.  good call with
catching the junit error.  haven't seen that before.

On 10/29/07, Will Glass-Husain <wg...@gmail.com> wrote:
> wow.  feels pretty primitive.  but necessary, I suppose.
>
> WILL
>
> On 10/29/07, nbubna@apache.org <nb...@apache.org> wrote:
> >
> > Author: nbubna
> > Date: Mon Oct 29 13:27:40 2007
> > New Revision: 589839
> >
> > URL: http://svn.apache.org/viewvc?rev=589839&view=rev
> > Log:
> > a bit more sysout gump sleuthing
> >
> > Modified:
> >
> >     velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> >
> > Modified:
> > velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> > URL:
> > http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java?rev=589839&r1=589838&r2=589839&view=diff
> >
> > ==============================================================================
> > ---
> > velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> > (original)
> > +++
> > velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> > Mon Oct 29 13:27:40 2007
> > @@ -263,27 +263,37 @@
> >          ve.setProperty("eventhandler.escape.javascript.match",
> > "/.*_js.*/");
> >          ve.init();
> >
> > +        System.out.println("Successfully engine init()");
> > +
> >          Writer writer;
> >
> >          // Html no JavaScript
> >          writer = new StringWriter();
> >          ve.evaluate(newEscapeContext(),writer,"test","$test1");
> > +        System.out.println("Escaping test1: "+writer.toString());
> >          assertEquals("Jimmy's &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> > ());
> > +        System.out.println("Successfully escaped test1: ");
> >
> >          // JavaScript and HTML
> >          writer = new StringWriter();
> >          ve.evaluate(newEscapeContext(),writer,"test","$test1_js");
> > +        System.out.println("Escaping test1_js: "+writer.toString());
> >          assertEquals("Jimmy\\'s &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> > ());
> > +        System.out.println("Successfully escaped test1_js");
> >
> >          // JavaScript and HTML
> >          writer = new StringWriter();
> >          ve.evaluate(newEscapeContext(),writer,"test","$test1_js_test");
> > +        System.out.println("Escaping test1_js_test: "+writer.toString());
> >          assertEquals("Jimmy\\'s &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> > ());
> > +        System.out.println("Successfully escaped test1_js_test");
> >
> >          // JavaScript and HTML (method call)
> >          writer = new StringWriter();
> >          ve.evaluate
> > (newEscapeContext(),writer,"test","$test1_js.substring(0,7)");
> > +        System.out.println("Escaping test1_js.substring(0,7):
> > "+writer.toString());
> >          assertEquals("Jimmy\\'s",writer.toString());
> > +        System.out.println("Successfully escaped
> > test1_js.substring(0,7)");
> >
> >          System.out.println("Escape selected references (global
> > configuration)");
> >
> >
> >
> >
>
>
> --
> Forio Business Simulations
>
> Will Glass-Husain
> wglass@forio.com
> www.forio.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Re: svn commit: r589839 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java

Posted by Will Glass-Husain <wg...@gmail.com>.
wow.  feels pretty primitive.  but necessary, I suppose.

WILL

On 10/29/07, nbubna@apache.org <nb...@apache.org> wrote:
>
> Author: nbubna
> Date: Mon Oct 29 13:27:40 2007
> New Revision: 589839
>
> URL: http://svn.apache.org/viewvc?rev=589839&view=rev
> Log:
> a bit more sysout gump sleuthing
>
> Modified:
>
>     velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
>
> Modified:
> velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> URL:
> http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java?rev=589839&r1=589838&r2=589839&view=diff
>
> ==============================================================================
> ---
> velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> (original)
> +++
> velocity/engine/trunk/src/test/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
> Mon Oct 29 13:27:40 2007
> @@ -263,27 +263,37 @@
>          ve.setProperty("eventhandler.escape.javascript.match",
> "/.*_js.*/");
>          ve.init();
>
> +        System.out.println("Successfully engine init()");
> +
>          Writer writer;
>
>          // Html no JavaScript
>          writer = new StringWriter();
>          ve.evaluate(newEscapeContext(),writer,"test","$test1");
> +        System.out.println("Escaping test1: "+writer.toString());
>          assertEquals("Jimmy's &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> ());
> +        System.out.println("Successfully escaped test1: ");
>
>          // JavaScript and HTML
>          writer = new StringWriter();
>          ve.evaluate(newEscapeContext(),writer,"test","$test1_js");
> +        System.out.println("Escaping test1_js: "+writer.toString());
>          assertEquals("Jimmy\\'s &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> ());
> +        System.out.println("Successfully escaped test1_js");
>
>          // JavaScript and HTML
>          writer = new StringWriter();
>          ve.evaluate(newEscapeContext(),writer,"test","$test1_js_test");
> +        System.out.println("Escaping test1_js_test: "+writer.toString());
>          assertEquals("Jimmy\\'s &lt;b&gt;pizza&lt;/b&gt;",writer.toString
> ());
> +        System.out.println("Successfully escaped test1_js_test");
>
>          // JavaScript and HTML (method call)
>          writer = new StringWriter();
>          ve.evaluate
> (newEscapeContext(),writer,"test","$test1_js.substring(0,7)");
> +        System.out.println("Escaping test1_js.substring(0,7):
> "+writer.toString());
>          assertEquals("Jimmy\\'s",writer.toString());
> +        System.out.println("Successfully escaped
> test1_js.substring(0,7)");
>
>          System.out.println("Escape selected references (global
> configuration)");
>
>
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com