Author: wglass Date: Fri Nov 18 13:05:31 2005 New Revision: 345566 URL: http://svn.apache.org/viewcvs?rev=345566&view=rev Log: check string interpolation with comments
Modified: jakarta/velocity/core/trunk/test/templates/compare/interpolation.cmp jakarta/velocity/core/trunk/test/templates/interpolation.vm Modified: jakarta/velocity/core/trunk/test/templates/compare/interpolation.cmp URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/test/templates/compare/interpolation.cmp?rev=345566&r1=345565&r2=345566&view=diff ============================================================================== --- jakarta/velocity/core/trunk/test/templates/compare/interpolation.cmp (original) +++ jakarta/velocity/core/trunk/test/templates/compare/interpolation.cmp Fri Nov 18 13:05:31 2005 @@ -16,7 +16,7 @@ How about a directive? Sure : - >a< >b< >c< + >a< >b< >c< For our next trick, lets interpolate a.... VelociMacro! @@ -36,5 +36,16 @@ False $code $!$\!code + +Now, check comments within strings. double quotes they should be removed. +Single quotes, they should be kept literal. + + +test +test + +testtest +test##test +test#* hello *#test -- end -- Modified: jakarta/velocity/core/trunk/test/templates/interpolation.vm URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/test/templates/interpolation.vm?rev=345566&r1=345565&r2=345566&view=diff ============================================================================== --- jakarta/velocity/core/trunk/test/templates/interpolation.vm (original) +++ jakarta/velocity/core/trunk/test/templates/interpolation.vm Fri Nov 18 13:05:31 2005 @@ -4,7 +4,7 @@ This template is used for Velocity regression testing. If you alter this template make sure you change the -corresponding comparison file so that the regression +corresponding comparison file so that the regression test doesn't fail incorrectly. *# @@ -34,7 +34,7 @@ #set($arr = ["a","b","c"]) #set($foo = "#foreach($a in $arr) >$a< #end") -$foo +$foo For our next trick, lets interpolate a.... VelociMacro! @@ -61,5 +61,22 @@ $a $b $c + +Now, check comments within strings. double quotes they should be removed. +Single quotes, they should be kept literal. + +#set($c1 = "test##test") +#set($c2 = "test ##test") +#set($c3 = "##test") +#set($c4 = "test#* hello *#test") +#set($c5 = 'test##test') +#set($c6 = 'test#* hello *#test') + +$c1 +$c2 +$c3 +$c4 +$c5 +$c6 -- end -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]