Skip to content

Commit 81aa38c

Browse files
committed
Add test showing scala/bug#7483 is fixed
1 parent 4719736 commit 81aa38c

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)