Matt and Blaine are having fun writing Ruby log splitters. I couldn’t pass up the opportunity to write one in Groovy, so here it is:
baseFilename = args.size() > 0 ? args[0] : "split.log" |
Matt and Blaine are having fun writing Ruby log splitters. I couldn’t pass up the opportunity to write one in Groovy, so here it is:
baseFilename = args.size() > 0 ? args[0] : "split.log" |
Update: Looks like it’s a problem in GroovyTestCase. testXXX() method always outputs a “.”
Update: Ah. It’s JUnit’s text-based test runner that is the culprit. Guess I shouldn’t exclusively use the GUI runner.
Running this test:
class PrintlnTest extends GroovyTestCase {
void testSomething() {
def name = GroovyTestCase.class.simpleName
assertEquals(GroovyTestCase.class.simpleName, name)
assertTrue(name.length() == "GroovyTestCase".length())
println name
println name
}
}
produces this output:
.GroovyTestCase GroovyTestCase Time: 0 OK (1 test)
Anyone have a clue?