diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/fileutils/test_fileutils.rb | 13 |
2 files changed, 10 insertions, 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. 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 |