aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathname
diff options
context:
space:
mode:
authorTanaka Akira <akr@fsij.org>2019-07-14 17:39:21 +0900
committerTanaka Akira <akr@fsij.org>2019-07-14 17:42:58 +0900
commit4d9504fe13c6470d9da74540f92a247e8c1d9b99 (patch)
tree557d834357439c28f7c4fc0de3f257c4192bbfdd /test/pathname
parent61577fa53bd1ce949912c3b1281668e0ccbcda37 (diff)
downloadruby-4d9504fe13c6470d9da74540f92a247e8c1d9b99.tar.gz
Delegates 3 arguments for Pathname.glob.
Thanks for the patch by pocke (Masataka Kuwabara) [Feature #14405].
Diffstat (limited to 'test/pathname')
-rw-r--r--test/pathname/test_pathname.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 8e6681232b..076a73e50b 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -1251,6 +1251,17 @@ class TestPathname < Test::Unit::TestCase
}
end
+ def test_s_glob_3args
+ with_tmpchdir('rubytest-pathname') {|dir|
+ open("f", "w") {|f| f.write "abc" }
+ Dir.chdir("/") {
+ assert_equal(
+ [Pathname("."), Pathname(".."), Pathname("f")],
+ Pathname.glob("*", File::FNM_DOTMATCH, base: dir).sort)
+ }
+ }
+ end
+
def test_s_getwd
wd = Pathname.getwd
assert_kind_of(Pathname, wd)