Skip to content

Commit

Permalink
Added eofs
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed Jul 23, 2023
1 parent 561c9ed commit 45c3abe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parsley/shared/src/test/scala/parsley/CombinatorTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ class CombinatorTests extends ParsleyTest {

"range_" should "perform a range with no results" in {
val p = range_(2, 5)(item)
p.parse("a") shouldBe a [Failure[_]]
p.parse("ab") shouldBe Success(())
p.parse("abcd") shouldBe Success(())
p.parse("abcde") shouldBe Success(())
(p <~ eof).parse("a") shouldBe a [Failure[_]]
(p <~ eof).parse("ab") shouldBe Success(())
(p <~ eof).parse("abcd") shouldBe Success(())
(p <~ eof).parse("abcde") shouldBe Success(())
(p <~ 'f').parse("abcdef") shouldBe Success(())
}
}

0 comments on commit 45c3abe

Please sign in to comment.