mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[eclipse/xtext#1455] Dedicated DocumentTest case for \r\n.
Signed-off-by: Arne Deutsch <Arne.Deutsch@itemis.de>
This commit is contained in:
parent
b18bb8ed7c
commit
1fff3d2648
2 changed files with 9 additions and 0 deletions
|
@ -148,6 +148,10 @@ class DocumentTest {
|
|||
ccc''').getLineContent(1));
|
||||
}
|
||||
|
||||
@Test def void testGetLineContent_windows_line_endings() {
|
||||
assertEquals('bbb', new Document(1, "aaa\r\nbbb\r\nccc").getLineContent(1));
|
||||
}
|
||||
|
||||
@Test def void testGetLineCount_empty() {
|
||||
assertEquals(1, new Document(1, '').lineCount);
|
||||
}
|
||||
|
|
|
@ -219,6 +219,11 @@ public class DocumentTest {
|
|||
Assert.assertEquals("bbb", new Document(Integer.valueOf(1), _builder.toString()).getLineContent(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetLineContent_windows_line_endings() {
|
||||
Assert.assertEquals("bbb", new Document(Integer.valueOf(1), "aaa\r\nbbb\r\nccc").getLineContent(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetLineCount_empty() {
|
||||
Assert.assertEquals(1, new Document(Integer.valueOf(1), "").getLineCount());
|
||||
|
|
Loading…
Reference in a new issue