spec/regexp-examples_spec.rb in regexp-examples-0.7.0 vs spec/regexp-examples_spec.rb in regexp-examples-1.0.0
- old
+ new
@@ -67,11 +67,10 @@
)
end
context "for complex char groups (square brackets)" do
examples_exist_and_match(
-
/[abc]/,
/[a-c]/,
/[abc-e]/,
/[^a-zA-Z]/,
/[\w]/,
@@ -80,11 +79,17 @@
/[\\]/,
/[\\\]]/,
/[\n-\r]/,
/[\-]/,
/[%-+]/, # This regex is "supposed to" match some surprising things!!!
- /['-.]/ # Test to ensure no "infinite loop" on character set expansion
+ /['-.]/, # Test to ensure no "infinite loop" on character set expansion
+ /[[abc]]/, # Nested groups
+ /[[[[abc]]]]/,
+ /[[a][b][c]]/,
+ /[[a-h]&&[f-z]]/, # Set intersection
+ /[[a-h]&&ab[c]]/, # Set intersection
+ /[[a-h]&[f-z]]/, # NOT set intersection
)
end
context "for complex multi groups" do
examples_exist_and_match(
@@ -171,10 +176,11 @@
end
context "for named properties" do
examples_exist_and_match(
/\p{L}/,
- /\p{Arabic}/,
+ /\p{Space}/,
+ /\p{AlPhA}/, # Checking case insensitivity
/\p{^Ll}/
)
end