test/-ext-/exception/test_enc_raise.rb
raw| 1 | # frozen_string_literal: false |
| 2 | require 'test/unit' |
| 3 | require '-test-/exception' |
| 4 | |
| 5 | module Bug |
| 6 | class Test_ExceptionER < Test::Unit::TestCase |
| 7 | def test_enc_raise |
| 8 | feature5650 = '[ruby-core:41160]' |
| 9 | Encoding.list.each do |enc| |
| 10 | next unless enc.ascii_compatible? |
| 11 | e = assert_raise(Bug::Exception) {Bug::Exception.enc_raise(enc, "[Feature #5650]")} |
| 12 | assert_equal(enc, e.message.encoding, feature5650) |
| 13 | end |
| 14 | end |
| 15 | end |
| 16 | end |