Repository: groovy
Updated Branches:
  refs/heads/master 49aaa2895 -> 697136d31


Simplify the test for "GROOVY-4585: backslash can not be escaped by 
`SimpleTemplateEngine`"


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/697136d3
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/697136d3
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/697136d3

Branch: refs/heads/master
Commit: 697136d31177f2ef5bcbfe5348f3d9389d06e7d8
Parents: 49aaa28
Author: danielsun1106 <realblue...@hotmail.com>
Authored: Fri Apr 6 22:49:46 2018 +0800
Committer: danielsun1106 <realblue...@hotmail.com>
Committed: Fri Apr 6 22:49:46 2018 +0800

----------------------------------------------------------------------
 src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/697136d3/src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy 
b/src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy
index fed604e..17f9120 100644
--- a/src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy
+++ b/src/test/groovy/bugs/groovy4585/Groovy4585Bug.groovy
@@ -20,14 +20,11 @@ package groovy.bugs.groovy4585
 
 class Groovy4585Bug extends GroovyTestCase {
     void test() {
-        assertScript '''
-            package groovy.bugs.groovy4585
-            def engineForBuildXml = new 
groovy.text.SimpleTemplateEngine(false, true)
-            def templateForBuildXml = 
engineForBuildXml.createTemplate(this.getClass().getResource("/groovy/bugs/groovy4585/groovy4585.xml").text)
-            String buildXmlContent = templateForBuildXml.make([names:['a', 
'b', 'c']]).toString()
-    
-            assert buildXmlContent.contains('<property name="drive" 
value="d:\\\\" />')
-            assert buildXmlContent.contains('<exec dir="${drive}" 
executable="echo">')
-        '''
+        def engineForBuildXml = new groovy.text.SimpleTemplateEngine(false, 
true)
+        def templateForBuildXml = 
engineForBuildXml.createTemplate(this.getClass().getResource("/groovy/bugs/groovy4585/groovy4585.xml").text)
+        String buildXmlContent = templateForBuildXml.make([names:['a', 'b', 
'c']]).toString()
+
+        assert buildXmlContent.contains('<property name="drive" value="d:\\" 
/>')
+        assert buildXmlContent.contains('<exec dir="${drive}" 
executable="echo">')
     }
 }

Reply via email to