sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1609654 - in /sling/trunk/contrib/crankstart/core/src/test: java/org/apache/sling/crankstart/CrankstartParserImplTest.java resources/parser-test.txt
Date Fri, 11 Jul 2014 08:51:19 GMT
Author: bdelacretaz
Date: Fri Jul 11 08:51:19 2014
New Revision: 1609654

URL: http://svn.apache.org/r1609654
Log:
SLING-3754 - test escaped variables

Modified:
    sling/trunk/contrib/crankstart/core/src/test/java/org/apache/sling/crankstart/CrankstartParserImplTest.java
    sling/trunk/contrib/crankstart/core/src/test/resources/parser-test.txt

Modified: sling/trunk/contrib/crankstart/core/src/test/java/org/apache/sling/crankstart/CrankstartParserImplTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/core/src/test/java/org/apache/sling/crankstart/CrankstartParserImplTest.java?rev=1609654&r1=1609653&r2=1609654&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/core/src/test/java/org/apache/sling/crankstart/CrankstartParserImplTest.java
(original)
+++ sling/trunk/contrib/crankstart/core/src/test/java/org/apache/sling/crankstart/CrankstartParserImplTest.java
Fri Jul 11 08:51:19 2014
@@ -100,6 +100,10 @@ public class CrankstartParserImplTest {
         assertCommand("var2", "and now OK.VAR2_7 here", it.next());
         assertCommand("var3", "using underscores in OK.UNDER_SCORE_14 variable", it.next());
         
+        assertCommand("esc1", "this ${ok.esc} is escaped", it.next());
+        assertCommand("esc2", "this OK.ESC_6 is not escaped", it.next());
+        assertCommand("esc3", "this $${ok.esc} is triple-escaped", it.next());
+        
         assertFalse("Expecting no more commands", it.hasNext());
     }
 }

Modified: sling/trunk/contrib/crankstart/core/src/test/resources/parser-test.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/crankstart/core/src/test/resources/parser-test.txt?rev=1609654&r1=1609653&r2=1609654&view=diff
==============================================================================
--- sling/trunk/contrib/crankstart/core/src/test/resources/parser-test.txt (original)
+++ sling/trunk/contrib/crankstart/core/src/test/resources/parser-test.txt Fri Jul 11 08:51:19
2014
@@ -18,4 +18,9 @@ last.command  
 # variables
 var1 this is ${some.var} here
 var2 and now ${ok.var2} here
-var3 using underscores in ${ok.under_score} variable
\ No newline at end of file
+var3 using underscores in ${ok.under_score} variable
+
+# escaping
+esc1 this $${ok.esc} is escaped
+esc2 this ${ok.esc} is not escaped
+esc3 this $$${ok.esc} is triple-escaped
\ No newline at end of file



Mime
View raw message