summaryrefslogtreecommitdiff
path: root/test/sdbm/test_sdbm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/sdbm/test_sdbm.rb')
-rw-r--r--test/sdbm/test_sdbm.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb
index 488b37a9a5..abaadbaf71 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,