diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 04:27:39 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 04:27:39 +0000 |
commit | 439e3880895826d18915ba77ca100ea696d708d6 (patch) | |
tree | e7c305903399476061d49d6801f9afa0aea298d1 | |
parent | 5179e8a765768dedd49a5a4fa25c9433aa383370 (diff) | |
download | ruby-439e3880895826d18915ba77ca100ea696d708d6.tar.gz |
add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | bootstraptest/test_knownbug.rb | 14 | ||||
-rw-r--r-- | test/ruby/test_m17n.rb | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 39dc6a9b8b..36c53d51bd 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -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' + diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index da765312cb..39a41909bc 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -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 |