blob: ba8f40d8b0732994e99600fc58f9caa0e5dd670c [file] [log] [blame]
package groovy.bugs
/**
* Verifies that DefaultGroovyMethods.transformLine(Reader, Writer, Closure)
* actually writes its output.
*/
class Groovy1081_Bug extends GroovyTestCase {
void testShort() {
def reader = new StringReader('abc')
def writer = new StringWriter()
reader.transformLine(writer) { it }
// Implementation was creating a BufferedWriter, but not flushing it
assertTrue(writer.toString().startsWith('abc'))
}
}