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_user): new assertion for user ownership. * test/fileutils/test_fileutils.rb (test_chown_error), (test_chown_without_permission, test_chown_with_root): based on the patch by vajrasky (Vajrasky Kok) at [ruby-core:59298]. [Feature #9292] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ef195f8d6
commit
7e2269a9ce
3 changed files with 94 additions and 1 deletions
|
@ -95,6 +95,15 @@ EOT
|
|||
File group ownership of "#{file}" unexpected:
|
||||
Expected: <#{expected}>
|
||||
Actual: <#{actual}>
|
||||
EOT
|
||||
end
|
||||
|
||||
def assert_ownership_user(expected, file)
|
||||
actual = File.stat(file).uid
|
||||
assert expected == actual, <<EOT
|
||||
File user ownership of "#{file}" unexpected:
|
||||
Expected: <#{expected}>
|
||||
Actual: <#{actual}>
|
||||
EOT
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue