mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
[ruby/yarp] Return Regexp options that match MRI for e, u, s, and n
17dbf4ec46
This commit is contained in:
parent
0996cf5593
commit
101ac364a5
2 changed files with 28 additions and 8 deletions
|
@ -208,6 +208,20 @@ module YARP
|
|||
assert_equal(Regexp::MULTILINE, options("m"))
|
||||
end
|
||||
|
||||
def test_flag_fixedencoding
|
||||
assert_equal(Regexp::FIXEDENCODING, options("e"))
|
||||
assert_equal(Regexp::FIXEDENCODING, options("u"))
|
||||
assert_equal(Regexp::FIXEDENCODING, options("s"))
|
||||
end
|
||||
|
||||
def test_flag_noencoding
|
||||
assert_equal(Regexp::NOENCODING, options("n"))
|
||||
end
|
||||
|
||||
def test_flag_once
|
||||
assert_equal(0, options("o"))
|
||||
end
|
||||
|
||||
def test_flag_combined
|
||||
value = Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED
|
||||
assert_equal(value, options("mix"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue