blob: 8157db568509e112e680612269cecb6a215ec084 [file] [log] [blame]
/**
* 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'))
}
}