From a072f94fbe5e0a5635cd7f82ca0d39e1abf7bacd Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 23 Dec 2007 01:36:54 +0000 Subject: [PATCH] add a test for [ruby-core:14288]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_knownbug.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 91e3cd5e48..74981190d8 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -3,9 +3,17 @@ # So all tests will cause failure. # -assert_normal_exit %{ +assert_normal_exit %q{ def foo(&block) yield if block end foo(&:bar) }, '[ruby-core:14279]' + +assert_equal 'ok', %q{ + open("tmp", "w") {|f| f.write "a\u00FFb" } + s = open("tmp", "r:iso-8859-1:utf-8") {|f| + f.gets("\xFF".force_encoding("iso-8859-1")) + } + s == "a\xFF" ? :ok : :ng +}, '[ruby-core:14288]'