diff options
| author | Tomoyuki Sahara <[email protected]> | 2015-11-22 07:12:23 +0900 |
|---|---|---|
| committer | Tomoyuki Sahara <[email protected]> | 2015-11-22 07:12:23 +0900 |
| commit | 14cdff075dd4e0e6f39a397a399a28ef0a13933f (patch) | |
| tree | 3b0c9650eb51c5ea467ab440d20a7b681e4274f8 /test | |
| parent | 828551f86ce9a2dd0c1a8af39c8ac99ecc0859a0 (diff) | |
| parent | 44473fecdd454574b8cab67da13c2d5bb809bee2 (diff) | |
| download | mruby-14cdff075dd4e0e6f39a397a399a28ef0a13933f.tar.gz mruby-14cdff075dd4e0e6f39a397a399a28ef0a13933f.zip | |
Merge pull request #48 from takahashim/file-path
add File.path
Diffstat (limited to 'test')
| -rw-r--r-- | test/file.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/file.rb b/test/file.rb index d6f39ceb1..487b54f38 100644 --- a/test/file.rb +++ b/test/file.rb @@ -106,3 +106,12 @@ assert('File.expand_path (with ENV)') do assert_equal "#{ENV['HOME']}/user", File.expand_path("user", ENV['HOME']), "relative with base_dir" end + +assert('File.path') do + assert_equal "", File.path("") + assert_equal "a/b/c", File.path("a/b/c") + assert_equal "a/../b/./c", File.path("a/../b/./c") + assert_raise(TypeError) { File.path(nil) } + assert_raise(TypeError) { File.path(123) } + +end |
