diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-10-12 21:26:05 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-10-12 21:26:05 +0900 |
commit | 2fd71112fb5b1aafa5b243c7ac5713cfae7fc23c (patch) | |
tree | 4152e34d988cba6e9313a4955de3d42234fd2bba /spec/ruby/shared/file | |
parent | 6527411f054fb2cd5878b5b82ab995c25a347c46 (diff) |
Make the test suite pass on real Android/Termux environment
Attempting to create a hard link raises EACCES
Diffstat (limited to 'spec/ruby/shared/file')
-rw-r--r-- | spec/ruby/shared/file/identical.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/shared/file/identical.rb b/spec/ruby/shared/file/identical.rb index ecc21727ca..b7a2904839 100644 --- a/spec/ruby/shared/file/identical.rb +++ b/spec/ruby/shared/file/identical.rb @@ -9,7 +9,11 @@ describe :file_identical, shared: true do touch(@file2) { |f| f.puts "file2" } rm_r @link - File.link(@file1, @link) + begin + File.link(@file1, @link) + rescue Errno::EACCES + File.symlink(@file1, @link) + end end after :each do |