diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-07-19 23:04:54 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-07-19 14:09:50 +0000 |
| commit | 5a8e87cb2ef7e4d6c0bdc86a4af207ecbb56a1e7 (patch) | |
| tree | d6e5013422dcc8de83f103c20f0de5bab7af243e /test/fileutils | |
| parent | 4431ca53639f3db5a702a5f8e78e8fbec2e4defe (diff) | |
[ruby/fileutils] Just the parent path of the destination symlink should exist
https://github.com/ruby/fileutils/commit/71225b1b46
Diffstat (limited to 'test/fileutils')
| -rw-r--r-- | test/fileutils/test_fileutils.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 4ccea53e95..92308d9557 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1080,7 +1080,11 @@ class TestFileUtils < Test::Unit::TestCase assert_raise(Errno::EEXIST, Errno::EACCES) { ln_sr fname, 'tmp', target_directory: false } - assert_file.not_exist? File.join('tmp/', File.basename(fname)) + dest = File.join('tmp/', File.basename(fname)) + assert_file.not_exist? dest + ln_sr fname, dest, target_directory: false + assert_file.symlink?(dest) + assert_equal("../#{fname}", File.readlink(dest)) end end if have_symlink? |
