From 7aa400bdb3bda7a75d404bbb9a3ed232c563fa86 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 4 Jul 2005 02:24:54 +0000 Subject: * test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests which using fork on fork-less platforms. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/sdbm/test_sdbm.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/sdbm') diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index d94b5e94a..58c21230e 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -31,6 +31,15 @@ class TestSDBM < Test::Unit::TestCase end end + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_version assert(! SDBM.const_defined?(:VERSION)) end @@ -70,6 +79,7 @@ class TestSDBM < Test::Unit::TestCase if not defined? SDBM::NOLOCK return end + return unless have_fork? # snip this test fork() { assert_instance_of(SDBM, sdbm = SDBM.open("tmptest_sdbm", 0644, -- cgit