1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/testunit/tests_for_parallel/ptest_forth.rb
nagachika 3eb0620c2a merge revision(s) r45953,r45961: [Backport #9767]
* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
	  is skipped after raise.
	  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
	  But it causes Mashal.load failure due to undefined class/module
	  DL::DLError when doing test-all parallel and test-all doesn't
	  complete. We create new MiniTest::Skip object to avoid Mashal.load
	  failure.
	  [ruby-core:62133] [Bug #9767]

	* test/testunit/test_parallel.rb (TestParallel): add a test.

	* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.
	  But it causes Marshal.load failure due to undefined class/module
	  complete. We create new MiniTest::Skip object to avoid Marshal.load


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@46916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:53:36 +00:00

29 lines
461 B
Ruby

require 'test/unit'
class TestE < Test::Unit::TestCase
class UnknownError < RuntimeError; end
def test_not_fail
assert_equal(1,1)
end
def test_always_skip
skip "always"
end
def test_always_fail
assert_equal(0,1)
end
def test_skip_after_unknown_error
begin
raise UnknownError, "unknown error"
rescue
skip "after raise"
end
end
def test_unknown_error
raise UnknownError, "unknown error"
end
end