groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Simplify the test for "GROOVY-4585: backslash can not be escaped by `SimpleTemplateEngine`"
Date Fri, 06 Apr 2018 14:49:51 GMT
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 <realbluesun@hotmail.com>
Authored: Fri Apr 6 22:49:46 2018 +0800
Committer: danielsun1106 <realbluesun@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">')
     }
 }


Mime
View raw message