test/test_tryopen.rb in kgio-2.8.0.2.g30c1 vs test/test_tryopen.rb in kgio-2.8.1

- old
+ new

@@ -28,10 +28,15 @@ def test_tryopen_EACCES tmp = Tempfile.new "tryopen" File.chmod 0000, tmp.path tmp = Kgio::File.tryopen(tmp.path) - assert_equal(:EACCES, tmp) + if Process.euid == 0 + assert_kind_of Kgio::File, tmp + warn "cannot test EACCES when euid == 0" + else + assert_equal(:EACCES, tmp) + end end def test_tryopen_readwrite tmp = Tempfile.new "tryopen" file = Kgio::File.tryopen(tmp.path, IO::RDWR)