我按照CLAVIN安装的说明进行操作。当我尝试构建CLAVIN包时,它会显示“构建失败”。在TextUtilsTest之后,它检查从文件中提取的内容是否与预期的String完全相同。这是TEST的代码,这里是method that reads contents from file。 这些是失败背后的细节:
<failure message="wrong output from fileToString expected:<Line1 word2[ Line2 word2 word3] Line3> but was:<Line1 word2[ Line2 word2 word3 ] Line3>" type="org.junit.ComparisonFailure"><![CDATA[org.junit.ComparisonFailure: wrong output from fileToString expected:<Line1 word2[
Line2 word2 word3]
Line3> but was:<Line1 word2[
Line2 word2 word3
]
Line3>
at org.junit.Assert.assertEquals(Assert.java:115)
at com.bericotech.clavin.util.TextUtilsTest.testFileToString(TextUtilsTest.java:56)
]]></failure>
我检查了输入文件,其内容与提供的字符串完全相同。我怀疑问题是由于文本文件的编码,我尝试了所有其他编码,但它只是使事情变得最糟糕。您是否建议我忽略该异常,然后继续下一个安装步骤?
答案 0 :(得分:0)
有一个意外的
或CR,回车,\r
。对于其余
或LF,\n
用作换行符。现在Windows使用\r\n
作为换行符,所以可能会有一些处理新行的混乱。作为Windows上的文本区域,产生包含文本的CR + LF,删除LF,然后粘贴到仅LF的XML中。
(
是XML的数字实体。旧MacOS有\r
作为换行符。)
解决方案是仅仅\n
的多行输入文本的行结尾替换。