spec/regexp-examples_spec.rb in regexp-examples-0.2.3 vs spec/regexp-examples_spec.rb in regexp-examples-0.2.4
- old
+ new
@@ -127,10 +127,29 @@
/\ca/,
/\cZ/,
/\c9/,
/\c[/,
/\c#/,
- /\c?/
+ /\c?/,
+ /\C-a/,
+ /\C-&/
)
end
+
+ context "for escape sequences" do
+ examples_exist_and_match(
+ /\x42/,
+ /\x1D/,
+ /\x3word/,
+ /#{"\x80".force_encoding("ASCII-8BIT")}/
+ )
+ end
+
+ context "for unicode sequences" do
+ examples_exist_and_match(
+ /\u6829/,
+ /\uabcd/
+ )
+ end
+
end
end