Skip to content
Browse files

Add testcase for previous bugfix

I verified that this test fails without the bugfix.
  • Loading branch information...
1 parent 71a1e3b commit 39f997af252643e67881b5e73077f8341b382c4b @Blaisorblade Blaisorblade committed Feb 9, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/test/scala/RegexSpecs.scala
View
12 src/test/scala/RegexSpecs.scala
@@ -32,6 +32,18 @@ object RegexSpecs extends Specification
}
}
}
+
+ "properly escape contained strings turned into regexes" in {
+ val p: Parser[String] = "(" | ")"
+
+ p("(") must beLike {
+ case Success("(", LineStream()) #:: SNil => ok
+ }
+
+ p(")") must beLike {
+ case Success(")", LineStream()) #:: SNil => ok
+ }
+ }
"match correctly when using a boundary token" in {
val p = "a" ~ "where\\b".r ~ "b"

0 comments on commit 39f997a

Please sign in to comment.
Something went wrong with that request. Please try again.