summaryrefslogtreecommitdiffstats
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
commitf1c06e38fdc052ccc752f3f4494bfaed3b9403ee (patch)
tree42206a5436185839fd028d91292b9da375c5c7cf /test/sdbm
parent07acfbb355e51b70d1ab182187197b2aaf2fc11c (diff)
downloadruby-f1c06e38fdc052ccc752f3f4494bfaed3b9403ee.tar.gz
ruby-f1c06e38fdc052ccc752f3f4494bfaed3b9403ee.tar.xz
ruby-f1c06e38fdc052ccc752f3f4494bfaed3b9403ee.zip
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: http://svn.ruby-lang.org/repos/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 3cc75bf23..09062d311 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