From 2b5bb9ad00ac8205cda18a3a35e6bd906ba5223d Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 12 Aug 2005 15:53:06 +0000 Subject: dbm/test_dbm.rb: specify pid for Process.wait. gdbm/test_gdbm.rb: ditto. sdbm/test_sdbm.rb: ditto. dbm/test_dbm.rb: add tests for open when db is not exist. gdbm/test_gdbm.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/sdbm/test_sdbm.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/sdbm/test_sdbm.rb') diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 3cc75bf23c..09062d311f 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -81,7 +81,7 @@ class TestSDBM < Test::Unit::TestCase end return unless have_fork? # snip this test - fork() { + pid = fork() { assert_instance_of(SDBM, sdbm = SDBM.open("tmptest_sdbm", 0644, SDBM::NOLOCK)) sleep 2 @@ -93,13 +93,13 @@ class TestSDBM < Test::Unit::TestCase assert_instance_of(SDBM, sdbm2 = SDBM.open("tmptest_sdbm", 0644)) } ensure - Process.wait + Process.wait pid sdbm2.close if sdbm2 end p Dir.glob("tmptest_sdbm*") if $DEBUG - fork() { + pid = fork() { assert_instance_of(SDBM, sdbm = SDBM.open("tmptest_sdbm", 0644)) sleep 2 } @@ -112,7 +112,7 @@ class TestSDBM < Test::Unit::TestCase SDBM::NOLOCK)) } ensure - Process.wait + Process.wait pid sdbm2.close if sdbm2 end end -- cgit v1.2.3