summaryrefslogtreecommitdiff
path: root/test/gdbm/test_gdbm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/gdbm/test_gdbm.rb')
-rw-r--r--test/gdbm/test_gdbm.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/gdbm/test_gdbm.rb b/test/gdbm/test_gdbm.rb
index 1d69634f88..9e97eb3587 100644
--- a/test/gdbm/test_gdbm.rb
+++ b/test/gdbm/test_gdbm.rb
@@ -43,6 +43,8 @@ if defined? GDBM
end
def test_delete_rdonly
+ skip("skipped because root can open anything") if Process.uid == 0
+
if /^CYGWIN_9/ !~ SYSTEM
assert_raise(GDBMError) {
@gdbm_rdonly.delete("foo")
@@ -211,6 +213,8 @@ if defined? GDBM
end if defined? GDBM::NOLOCK # gdbm 1.8.0 specific
def test_s_open_error
+ skip if Process.uid == 0 # because root can open anything
+
assert_instance_of(GDBM, gdbm = GDBM.open("#{@tmpdir}/#{@prefix}", 0))
assert_raise(Errno::EACCES, Errno::EWOULDBLOCK) {
GDBM.open("#{@tmpdir}/#{@prefix}", 0)