diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 05:09:47 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-04 05:09:47 +0000 |
commit | 8c9566435548bad6aadd5651e0694cec74e8af8a (patch) | |
tree | 231d751a6d75885ee39669bb944df67a6ae3fdfd /test/fileutils/test_fileutils.rb | |
parent | b6e4f347dc258130d7fd2d0a5c923bf4340fe28c (diff) | |
download | ruby-8c9566435548bad6aadd5651e0694cec74e8af8a.tar.gz |
* 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
Diffstat (limited to 'test/fileutils/test_fileutils.rb')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index c2a9be6e3a..0d388a4a5f 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -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 |