mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_fileutils.rb: tests for chown
* test/fileutils/fileasserts.rb (assert_ownership_group): new assertion for group ownership. * test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}): based on the patch by vajrasky (Vajrasky Kok) at [ruby-core:59281]. [Feature #9286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bc159ec502
commit
e6847d1c55
3 changed files with 63 additions and 1 deletions
|
@ -86,6 +86,15 @@ EOT
|
|||
File modes expected to be equal:
|
||||
<#{'%0*o' % [width, mode1]}>: "#{file1}"
|
||||
<#{'%0*o' % [width, mode2]}>: "#{file2}"
|
||||
EOT
|
||||
end
|
||||
|
||||
def assert_ownership_group(expected, file)
|
||||
actual = File.stat(file).gid
|
||||
assert expected == actual, <<EOT
|
||||
File group ownership of "#{file}" unexpected:
|
||||
Expected: <#{expected}>
|
||||
Actual: <#{actual}>
|
||||
EOT
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue