From 445fe9ba32fc6687cbac19b0f24d696f9d10123c Mon Sep 17 00:00:00 2001 From: dearblue Date: Fri, 19 Sep 2025 22:43:12 +0900 Subject: [PATCH] Add a test for the `File.absolute_path` method --- mrbgems/mruby-io/test/file.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mrbgems/mruby-io/test/file.rb b/mrbgems/mruby-io/test/file.rb index e6eda5434..3bcb123bf 100644 --- a/mrbgems/mruby-io/test/file.rb +++ b/mrbgems/mruby-io/test/file.rb @@ -315,6 +315,11 @@ assert('File.expand_path (with getenv(3))') do assert_equal "#{MRubyIOTestUtil::ENV_HOME}/user", File.expand_path("user", MRubyIOTestUtil::ENV_HOME), "relative with base_dir" end +assert('File.absolute_path') do + assert_equal File.expand_path("./~"), File.absolute_path("~") + assert_equal File.expand_path("./~user1"), File.absolute_path("~user1") +end + if MRubyIOTestUtil.win? assert('File.absolute_path? (for windows)') do assert_true File.absolute_path?("c:/")