* test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8
encoding regardless environment. * test/ruby/envutil.rb (invoke_ruby): add encoding option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
596a275035
commit
d514cd3ca0
@ -1,3 +1,10 @@
|
||||
Wed Jun 23 12:44:47 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8
|
||||
encoding regardless environment.
|
||||
|
||||
* test/ruby/envutil.rb (invoke_ruby): add encoding option.
|
||||
|
||||
Wed Jun 23 06:44:05 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (fchown): need to check. a patch by Eric Wong
|
||||
|
@ -76,6 +76,10 @@ module EnvUtil
|
||||
opt[:in] = in_c
|
||||
opt[:out] = out_c if capture_stdout
|
||||
opt[:err] = err_c if capture_stderr
|
||||
if enc = opt.delete(:encoding)
|
||||
out_p.set_encoding(enc) if out_p
|
||||
err_p.set_encoding(enc) if err_p
|
||||
end
|
||||
case args.first
|
||||
when Hash
|
||||
child_env = [args.shift]
|
||||
|
@ -819,9 +819,11 @@ class TestRegexp < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_dup_warn
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], /\A\z/)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], [])
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/u, nil,
|
||||
encoding: Encoding::UTF_8)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/u, nil,
|
||||
encoding: Encoding::UTF_8)
|
||||
end
|
||||
|
||||
def test_property_warn
|
||||
|
Loading…
x
Reference in New Issue
Block a user