mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_m17n.rb: escape
* test/ruby/test_m17n.rb (test_regexp_ascii_none): escape regexp meta characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6dd5ee752a
commit
e2583b17b9
1 changed files with 4 additions and 4 deletions
|
@ -465,7 +465,7 @@ class TestM17N < Test::Unit::TestCase
|
|||
def test_regexp_ascii_none
|
||||
r = /a/n
|
||||
|
||||
assert_warning(%r{regexp match /.../n against to}) {
|
||||
assert_warning(%r{regexp match /\.\.\./n against to}) {
|
||||
assert_regexp_generic_ascii(r)
|
||||
}
|
||||
|
||||
|
@ -474,13 +474,13 @@ class TestM17N < Test::Unit::TestCase
|
|||
assert_equal(0, r =~ s("a"))
|
||||
assert_equal(0, r =~ u("a"))
|
||||
assert_equal(nil, r =~ a("\xc2\xa1"))
|
||||
assert_warning(%r{regexp match /.../n against to EUC-JP string}) {
|
||||
assert_warning(%r{regexp match /\.\.\./n against to EUC-JP string}) {
|
||||
assert_equal(nil, r =~ e("\xc2\xa1"))
|
||||
}
|
||||
assert_warning(%r{regexp match /.../n against to Windows-31J string}) {
|
||||
assert_warning(%r{regexp match /\.\.\./n against to Windows-31J string}) {
|
||||
assert_equal(nil, r =~ s("\xc2\xa1"))
|
||||
}
|
||||
assert_warning(%r{regexp match /.../n against to UTF-8 string}) {
|
||||
assert_warning(%r{regexp match /\.\.\./n against to UTF-8 string}) {
|
||||
assert_equal(nil, r =~ u("\xc2\xa1"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue