diff options
| author | takahashim <[email protected]> | 2015-11-22 13:13:52 +0900 |
|---|---|---|
| committer | takahashim <[email protected]> | 2015-11-22 13:13:52 +0900 |
| commit | 2cc674e58e04a0ae403e0429013ef79e129afeb4 (patch) | |
| tree | 7f2adbdee16c9abbc760ec428a95f629f0a46d95 /test/file.rb | |
| parent | 14cdff075dd4e0e6f39a397a399a28ef0a13933f (diff) | |
| download | mruby-2cc674e58e04a0ae403e0429013ef79e129afeb4.tar.gz mruby-2cc674e58e04a0ae403e0429013ef79e129afeb4.zip | |
add File.symlink
Diffstat (limited to 'test/file.rb')
| -rw-r--r-- | test/file.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/file.rb b/test/file.rb index 487b54f38..ef8be37ec 100644 --- a/test/file.rb +++ b/test/file.rb @@ -115,3 +115,18 @@ assert('File.path') do assert_raise(TypeError) { File.path(123) } end + +assert('File.symlink') do + target_name = "/usr/bin" + symlink_name = "test-bin-dummy" + if !File.exist?(target_name) + skip("target directory of File.symlink is not found") + else + assert_equal 0, File.symlink(target_name, symlink_name) + begin + assert_equal true, File.symlink?(symlink_name) + ensure + File.delete symlink_name + end + end +end |
