mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/fileutils/test_fileutils.rb (test_cp): test if the error is kind of SystemCallError. It is needless details that which errno is set on each systems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b6e4f347dc
commit
8c95664355
2 changed files with 10 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Dec 4 14:09:24 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* test/fileutils/test_fileutils.rb (test_cp): test if the error is
|
||||
kind of SystemCallError. It is needless details that which errno
|
||||
is set on each systems.
|
||||
|
||||
Thu Dec 4 13:24:13 2003 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* lib/monitor.rb: use Object#__send__ instead of Object#send.
|
||||
|
|
|
@ -44,13 +44,6 @@ def have_hardlink?
|
|||
HAVE_HARDLINK
|
||||
end
|
||||
|
||||
case RUBY_PLATFORM
|
||||
when /openbsd/, /freebsd/
|
||||
ErrorOnLoopedSymlink = Errno::ELOOP
|
||||
when /linux/, /netbsd/, /cygwin/, // # FIXME
|
||||
ErrorOnLoopedSymlink = Errno::EEXIST
|
||||
end
|
||||
|
||||
class TestFileUtils < Test::Unit::TestCase
|
||||
|
||||
include FileUtils
|
||||
|
@ -412,9 +405,11 @@ if have_symlink?
|
|||
}
|
||||
# src==dest (3) looped symlink
|
||||
File.symlink 'cptmp_symlink', 'tmp/cptmp_symlink'
|
||||
assert_raises(ErrorOnLoopedSymlink) {
|
||||
begin
|
||||
ln 'tmp/cptmp_symlink', 'tmp/cptmp_symlink'
|
||||
}
|
||||
rescue => err
|
||||
assert_kind_of SystemCallError, err
|
||||
end
|
||||
end
|
||||
|
||||
# pathname
|
||||
|
|
Loading…
Reference in a new issue