It looks to me as though CanonTestCase tries to capture the output in a ByteArrayOutputStream,
but LocalizedResource.OutputWriter sends its output directly to System.out, and doesn't make
provision for directing the output elsewhere.
I wonder if it would help to make a subclass of ScriptTestCase which overrides CanonTestCase.getOutputStream
so that, in addition to fabricating the test output stream, we also call System.setOut() to tell
System.out to redirect its output to the CanonTestCase's output stream?
Alternatively, and perhaps better, in ij.java, around line 110, when ij.runScript() is calling
LocalizedResource.getNewOutput(sqlOut), perhaps we could create a new LocalizedResource.setOutput()
method which we could pass the LocalizedOutput object to, and it would reset the "out" field
in the LocalizedResource class to point to the new LocalizedOutput object, rather than the
one which points to System.out.
What do you think?