summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/exception/test_exception_at_throwing.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/-ext-/exception/test_exception_at_throwing.rb b/test/-ext-/exception/test_exception_at_throwing.rb
new file mode 100644
index 0000000..aba2607
--- /dev/null
+++ b/test/-ext-/exception/test_exception_at_throwing.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+require 'test/unit'
+
+module Bug
+ class TestException < Test::Unit::TestCase
+ def test_exception_at_throwing
+ assert_separately(%w[-r-test-/exception], "#{<<-"begin;"}\n#{<<-"end;"}")
+ begin;
+ e = RuntimeError.new("[Bug #13176]")
+ assert_raise_with_message(e.class, e.message) do
+ catch do |t|
+ Bug::Exception.ensure_raise(nil, e) {throw t}
+ end
+ end
+ end;
+ end
+ end
+end