未验证 提交 3a81319c 编写于 作者: J Jesse Glick

TextFileTest.tail failed on Windows when using a source checkout with Unix newlines.

上级 501b1172
......@@ -40,10 +40,9 @@ public class TextFileTest {
public void tail() throws Exception {
File f = tmp.newFile();
FileUtils.copyURLToFile(getClass().getResource("ascii.txt"), f);
String whole = FileUtils.readFileToString(f);
TextFile t = new TextFile(f);
String tailStr = "la, vitae interdum quam rutrum id." + System.lineSeparator();
assertEquals(34 + System.lineSeparator().length(), tailStr.length());
String tailStr = whole.substring(whole.length() - 34);
assertEquals(tailStr, t.fastTail(tailStr.length()));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册