spec/regexp-examples_spec.rb in regexp-examples-0.2.2 vs spec/regexp-examples_spec.rb in regexp-examples-0.2.3
- old
+ new
@@ -28,10 +28,11 @@
/a*/,
/a+/,
/a?/,
/a{1}/,
/a{1,}/,
+ /a{,2}/,
/a{1,2}/
)
end
context "for basic groups" do
@@ -116,9 +117,20 @@
examples_raise_illegal_syntax_error(
/(?=lookahead)/,
/(?!neglookahead)/,
/(?<=lookbehind)/,
/(?<!neglookbehind)/
+ )
+ end
+
+ context "for control characters" do
+ examples_exist_and_match(
+ /\ca/,
+ /\cZ/,
+ /\c9/,
+ /\c[/,
+ /\c#/,
+ /\c?/
)
end
end
end