1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-29 04:27:39 +00:00
parent 5179e8a765
commit 439e388089
2 changed files with 21 additions and 0 deletions

View file

@ -2,3 +2,17 @@
# This test file concludes tests which point out known bugs.
# So all tests will cause failure.
#
assert_normal_exit %q{
File.read("/dev/null").clone
}, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA'
assert_normal_exit %q{
class Foo
def self.add_method
class_eval("def some-bad-name; puts 'hello' unless @some_variable.some_function(''); end")
end
end
Foo.add_method
}, '[ruby-core:14556] reported by Frederick Cheung'

View file

@ -1865,6 +1865,13 @@ class TestM17N < Test::Unit::TestCase
assert_equal(Encoding::EUC_JP, "\xa4\xa2".force_encoding("euc-jp").gsub(/./, '\&').encoding)
end
def test_gsub
s = 'abc'
s.ascii_only?
s.gsub!(/b/, "\x80")
assert_equal(false, s.ascii_only?, "[ruby-core:14566] reported by Sam Ruby")
end
def test_regexp_match
assert_equal([0,0], //.match("\xa1\xa1".force_encoding("euc-jp"),-1).offset(0))
end