1
我按照CLAVIN安裝說明進行操作。當我嘗試構建CLAVIN包時,它會在TextUtilsTest之後顯示「構建失敗」,它檢查從文件中提取的內容與預期的字符串完全相同。以下是TEST的代碼,這裏是method that reads contents from file。 這些都是它的失敗背後的細節:爲什麼fileToString不能正確讀取文件的內容?
<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>
我檢查輸入文件,其內容是完全一樣的提供的字符串。我懷疑這個問題是由於文本文件的編碼造成的,我嘗試了所有其他的編碼,但這隻會讓事情變得更糟。你會建議我忽略這個異常,然後繼續下一步安裝嗎?
謝謝!它在我用空格替換了所有換行符之後起作用。 –