-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from Philippus/issue-5669
Support '\r' and '\r\n' line endings, closes scala/bug#5669
- Loading branch information
Showing
3 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
shared/src/test/scala/scala/util/parsing/combinator/t5669.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package scala.util.parsing.combinator | ||
|
||
import scala.util.parsing.input.OffsetPosition | ||
|
||
import org.junit.Test | ||
import org.junit.Assert.assertEquals | ||
|
||
class t5669 { | ||
@Test | ||
def test: Unit = { | ||
val op = new OffsetPosition("foo\rbar", 4) | ||
assertEquals(2, op.line) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters