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:50:49 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X c2cd68047 -> b3b570489


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

(cherry picked from commit 697136d)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: b3b570489483c135b32e62e42095e021726c4d01
Parents: c2cd680
Author: danielsun1106 <realbluesun@hotmail.com>
Authored: Fri Apr 6 22:49:46 2018 +0800
Committer: danielsun1106 <realbluesun@hotmail.com>
Committed: Fri Apr 6 22:50:44 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/b3b57048/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