Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-980

SimpleTemplateEngine fails when enclose expression dosn't immediately evaluate to a String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0-JSR-3
    • None
    • None

    Description

      void todo_testWithMarkupBuilder(){
      def text = '''<%
      builder = new groovy.xml.MarkupBuilder(out)
      [1,2,3].each

      { count -> out.print(1) }

      %>'''
      assertEquals('111', simpleCall(text))
      }

      produces

      <getAt>[1, 2, 3]</getAt>11111

      while everything was fine in Groovy classic.

      I will commit more tests in groovy.text.SimpleTemplateEngineText.groovy

      Attachments

        Issue Links

          Activity

            People

              sormuras sormuras
              codevise Dierk König
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: