summaryrefslogtreecommitdiffhomepage
path: root/test/file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/file.rb')
-rw-r--r--test/file.rb9
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