diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-22 21:01:58 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-22 21:01:58 +0000 |
commit | f5354619751ad85540494e6fe688aad4ee4b8573 (patch) | |
tree | 009dda09b8f9f5f51fef12d4d064a7b12bad401b /test/ruby | |
parent | ec4689b1649c4d68257d1704e26c6010033f4096 (diff) | |
download | ruby-f5354619751ad85540494e6fe688aad4ee4b8573.tar.gz |
* test/ruby/test_file.rb: check File#chown(nil,nil). [ruby-dev:27140]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_file.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index cdeceeb03d..4947e081c5 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -99,4 +99,19 @@ class TestFile < Test::Unit::TestCase assert_equal(?a, f.getc) end + def test_s_chown + assert_nothing_raised { File.chown -1, -1 } + assert_nothing_raised { File.chown nil, nil } + end + + def test_chown + assert_nothing_raised { + File.open(__FILE__) {|f| f.chown -1, -1 } + } + # [ruby-dev:27140] + assert_nothing_raised { + File.open(__FILE__) {|f| f.chown nil, nil } + } + end + end |