test_pathname.rb#test_open should care about umask
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
76897dbabb
commit
3e5a25210e
@ -912,11 +912,11 @@ class TestPathname < Test::Unit::TestCase
|
||||
}
|
||||
|
||||
Pathname("b").open("w", 0444) {|f| f.write "def" }
|
||||
assert_equal(0444, File.stat("b").mode & 0777)
|
||||
assert_equal(0444 & ~File.umask, File.stat("b").mode & 0777)
|
||||
assert_equal("def", File.read("b"))
|
||||
|
||||
Pathname("c").open("w", 0444, {}) {|f| f.write "ghi" }
|
||||
assert_equal(0444, File.stat("c").mode & 0777)
|
||||
assert_equal(0444 & ~File.umask, File.stat("c").mode & 0777)
|
||||
assert_equal("ghi", File.read("c"))
|
||||
|
||||
g = path.open
|
||||
|
Loading…
x
Reference in New Issue
Block a user