diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:18:23 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:18:23 +0000 |
| commit | bb3121757f492b8f970b0581097e132b7c90c275 (patch) | |
| tree | 7be4140f2bf54ebf176c72d0bd3e33d7c428825c /test/sdbm | |
| parent | 59210573ee3d9017fbf2e914139af5b86b4c0f82 (diff) | |
| download | ruby-bb3121757f492b8f970b0581097e132b7c90c275.tar.gz ruby-bb3121757f492b8f970b0581097e132b7c90c275.tar.xz ruby-bb3121757f492b8f970b0581097e132b7c90c275.zip | |
* 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/branches/ruby_1_8@8716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/sdbm')
| -rw-r--r-- | test/sdbm/test_sdbm.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 488b37a9a..abaadbaf7 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, |
