diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:24:54 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-04 02:24:54 +0000 |
| commit | 7aa400bdb3bda7a75d404bbb9a3ed232c563fa86 (patch) | |
| tree | fcaa6bb519f44e88b8d8036196e36ec2899ae5f5 /test/gdbm | |
| parent | 0048e0225d6529f1e3bab306eef22ae08f961b01 (diff) | |
| download | ruby-7aa400bdb3bda7a75d404bbb9a3ed232c563fa86.tar.gz ruby-7aa400bdb3bda7a75d404bbb9a3ed232c563fa86.tar.xz ruby-7aa400bdb3bda7a75d404bbb9a3ed232c563fa86.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/trunk@8717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/gdbm')
| -rw-r--r-- | test/gdbm/test_gdbm.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb index d2f3a945a..307cd1c3d 100644 --- a/test/gdbm/test_gdbm.rb +++ b/test/gdbm/test_gdbm.rb @@ -58,6 +58,15 @@ if defined? GDBM end end + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_s_new_has_no_block # GDBM.new ignore the block foo = true @@ -108,6 +117,7 @@ if defined? GDBM assert_equal(GDBM.open("tmptest_gdbm") { :foo }, :foo) end def test_s_open_lock + return unless have_fork? # snip this test fork() { assert_instance_of(GDBM, gdbm = GDBM.open("tmptest_gdbm", 0644)) sleep 2 @@ -146,6 +156,7 @@ if defined? GDBM if not defined? GDBM::NOLOCK return end + return unless have_fork? # snip this test fork() { assert_instance_of(GDBM, gdbm = GDBM.open("tmptest_gdbm", 0644, |
