summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-23 03:44:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-23 03:44:55 +0000
commitd514cd3ca0dedfd62e86698e53b4dc01dff75ed2 (patch)
tree8050b9b431a510fcb6c361a51eb836159b218ed6 /test/ruby/test_regexp.rb
parent596a275035e2cd7ef4bd86f344f54fa4dd31c54e (diff)
* 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
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 1a9066311e..9fd948d6a1 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -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