[
https://issues.apache.org/jira/browse/UIMA-1582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758681#action_12758681
]
Marshall Schor commented on UIMA-1582:
--------------------------------------
I looked into this in some detail, and found:
# The test input string has a single char (hex 0A) for it's line ending
character.
# The test input string does not have any svn:eol-style property set - so when
it is checked out, it is not altered.
# The output string being created is done by:
## building a dom tree, inserting xml nodes
## for all the covered texts, inserting dom text nodes
## converting the dom tree to a string using xalan's transformer
xalan's transformer converts any dom text nodes having a line ending into the
platform's line ending character (surprise!).
This can be somewhat controlled, (in recent versions of xalan?), by doing:
*
transformer.setOutputProperty("{http://xml.apache.org/xalan}line-separator",
"\n");
For instance, that line could be added to the SimpleServer's "ResultConverter"
class after line 79.
I'm not sure what the right fix is.
* Adding the 1582patch.txt breaks the test case in Windows, so that's not a
universal fix.
* Changing the test case to normalize both strings to common line-separators
would work, I think.
* But should the ResultConvert class be changed to output results in a
particular line-ending style? (Is there an internet "standard" for this? A
quick search on the web shows some hits indicating that \n might be the web
standard line-separator.)
> SimpleServer ConfigTest fails
> -----------------------------
>
> Key: UIMA-1582
> URL: https://issues.apache.org/jira/browse/UIMA-1582
> Project: UIMA
> Issue Type: Bug
> Components: Sandbox-SimpleServer
> Affects Versions: 2.3S
> Environment: MacOS X
> Reporter: Tommaso Teofili
> Fix For: 2.3
>
> Attachments: 1582patch.txt
>
>
> testResultGeneration1 to testResultGeneration10 fail due to a wrong starting
> carriage return in the expected String used to compare against the actual
> result; actual.equals(expected) fails for standoff (not inlined
> configuration XML).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.