summaryrefslogtreecommitdiff
path: root/test/sdbm
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-12 15:53:06 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-12 15:53:06 +0000
commit2b5bb9ad00ac8205cda18a3a35e6bd906ba5223d (patch)
tree42206a5436185839fd028d91292b9da375c5c7cf /test/sdbm
parent66323da355837efbf7abc31e6770b1ae20753b27 (diff)
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
Diffstat (limited to 'test/sdbm')
-rw-r--r--test/sdbm/test_sdbm.rb8
1 files changed, 4 insertions, 4 deletions
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