Skip to content

Commit 87db3f5

Browse files
authored
Merge pull request #157 from Philippus/issue-6067
Add test showing scala/bug#6067 is fixed
2 parents be861c7 + dcde67a commit 87db3f5

File tree

1 file changed

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

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import scala.util.parsing.combinator._
2+
3+
import org.junit.Test
4+
import org.junit.Assert.assertEquals
5+
6+
class t6067 extends RegexParsers {
7+
object TestParser extends RegexParsers {
8+
def p: TestParser.ParseResult[TestParser.~[List[String], String]] = parseAll(rep(commit("a")) ~ "b", "aaab")
9+
}
10+
11+
val expected = """[1.4] error: 'a' expected but 'b' found
12+
13+
aaab
14+
^"""
15+
@Test
16+
def test: Unit = {
17+
assertEquals(expected, TestParser.p.toString)
18+
}
19+
}

0 commit comments

Comments
 (0)