blob: 408aaaca0a7b3ba737b7cb5484a7b25b25c483a4 [file] [log] [blame]
package groovy;
import java.io.StringWriter;
import groovy.text.Template;
import groovy.text.GStringTemplateEngine;
import junit.framework.TestCase;
/**
* @author andy
* @since Jan 11, 2006 1:05:23 PM
*/
public class SimpleGStringTemplateEngineTest extends GroovyTestCase
{
public void testRegressionCommentBug() throws Exception
{
final Template template = new GStringTemplateEngine().createTemplate(
"<% // This is a comment that will be filtered from output %>\n" +
"Hello World!"
);
final StringWriter sw = new StringWriter();
template.make().writeTo(sw);
assertEquals("\nHello World!", sw.toString());
}
}