Skip to content

Commit 7650a5d

Browse files
authored
Merge pull request #158 from Philippus/issue-7483
Add test showing scala/bug#7483 is fixed
2 parents 87db3f5 + 81aa38c commit 7650a5d

File tree

1 file changed

+17
-0
lines changed
  • shared/src/test/scala/scala/util/parsing/combinator

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package scala.util.parsing.combinator
2+
3+
import scala.util.parsing.input.{CharSequenceReader, OffsetPosition}
4+
5+
import org.junit.Test
6+
import org.junit.Assert.assertEquals
7+
8+
class t7483 {
9+
val s = "foo\nbar"
10+
val reader = new CharSequenceReader(s.toCharArray(), 0)
11+
val p = reader.pos.asInstanceOf[OffsetPosition]
12+
13+
@Test
14+
def test: Unit = {
15+
assertEquals("foo", p.lineContents)
16+
}
17+
}

0 commit comments

Comments
 (0)