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:51:25 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 6b3f5990a -> 0311b7745


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/0311b774
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/0311b774
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/0311b774

Branch: refs/heads/GROOVY_2_5_X
Commit: 0311b7745f5b1d7ab081cbec0c55ed34445bde88
Parents: 6b3f599
Author: danielsun1106 <realbluesun@hotmail.com>
Authored: Fri Apr 6 22:49:46 2018 +0800
Committer: danielsun1106 <realbluesun@hotmail.com>
Committed: Fri Apr 6 22:51:11 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/0311b774/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