summaryrefslogtreecommitdiff
path: root/jni/ruby/test/-ext-/exception/test_enc_raise.rb
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/test/-ext-/exception/test_enc_raise.rb
Fresh start
Diffstat (limited to 'jni/ruby/test/-ext-/exception/test_enc_raise.rb')
-rw-r--r--jni/ruby/test/-ext-/exception/test_enc_raise.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/jni/ruby/test/-ext-/exception/test_enc_raise.rb b/jni/ruby/test/-ext-/exception/test_enc_raise.rb
new file mode 100644
index 0000000..a578b16
--- /dev/null
+++ b/jni/ruby/test/-ext-/exception/test_enc_raise.rb
@@ -0,0 +1,15 @@
+require 'test/unit'
+require '-test-/exception'
+
+module Bug
+ class TestException < Test::Unit::TestCase
+ def test_enc_raise
+ feature5650 = '[ruby-core:41160]'
+ Encoding.list.each do |enc|
+ next unless enc.ascii_compatible?
+ e = assert_raise(Bug::Exception) {Bug::Exception.enc_raise(enc, "[Feature #5650]")}
+ assert_equal(enc, e.message.encoding, feature5650)
+ end
+ end
+ end
+end