[
https://issues.apache.org/jira/browse/DERBY-5303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059473#comment-13059473
]
Bryan Pendleton commented on DERBY-5303:
----------------------------------------
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?
> Convert tools/URLCheck.sql to junit
> -----------------------------------
>
> Key: DERBY-5303
> URL: https://issues.apache.org/jira/browse/DERBY-5303
> Project: Derby
> Issue Type: Task
> Components: Test
> Reporter: Houx Zhang
> Assignee: Houx Zhang
> Labels: gsoc2011
> Attachments: derby-5303-1-URLCheck.out, derby-5303-1.patch
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira