|
Groovy example source code file (EachLineTest.groovy)
The Groovy EachLineTest.groovy source code
package org.codehaus.groovy.runtime;
class EachLineTest extends GroovyTestCase {
// GROOVY-4364
void testReturnsLastValueReturnedByClosure() {
def result = "ONE\nTWO\nTHREE".eachLine { it.toLowerCase() }
assert result == "three"
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy EachLineTest.groovy source code file: |
Other websites by Alvin Alexander:
Life/living in Alaska (OneMansAlaska.com)
How I Sold My Business (HowISoldMyBusiness.com)
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.