mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
* test/ruby/test_regexp.rb: Add test cases for $KCODE
and $=
warning
[Misc #11770][ruby-dev:49398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3aeef6bcf0
commit
c0c733791c
2 changed files with 15 additions and 0 deletions
|
@ -537,6 +537,16 @@ class TestRegexp < Test::Unit::TestCase
|
|||
assert_nothing_raised { $= = nil }
|
||||
end
|
||||
|
||||
def test_KCODE_warning
|
||||
assert_warning(/variable \$KCODE is no longer effective; ignored/) { $KCODE = nil }
|
||||
assert_warning(/variable \$KCODE is no longer effective/) { $KCODE = nil }
|
||||
end
|
||||
|
||||
def test_ignorecase_warning
|
||||
assert_warning(/variable \$= is no longer effective; ignored/) { $= = nil }
|
||||
assert_warning(/variable \$= is no longer effective/) { $= }
|
||||
end
|
||||
|
||||
def test_match_setter
|
||||
/foo/ =~ "foo"
|
||||
m = $~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue