[前][次][番号順一覧][スレッド一覧]

ruby-changes:69599

From: Nobuyoshi <ko1@a...>
Date: Fri, 5 Nov 2021 10:25:11 +0900 (JST)
Subject: [ruby-changes:69599] f62f020f56 (master): Add the test of `Dir.glob` when `sort: true` is given explicitly

https://git.ruby-lang.org/ruby.git/commit/?id=f62f020f56

From f62f020f5654297c1a876ab7e9f93afbfe879f1d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 5 Nov 2021 10:20:02 +0900
Subject: Add the test of `Dir.glob` when `sort: true` is given explicitly

---
 test/ruby/test_dir.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 71bff5f5c37..3e03d7c7bcf 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -171,6 +171,8 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L171
                  Dir.glob([@root, File.join(@root, "*")]))
     assert_equal([@root] + ("a".."z").map {|f| File.join(@root, f) },
                  Dir.glob([@root, File.join(@root, "*")], sort: false).sort)
+    assert_equal([@root] + ("a".."z").map {|f| File.join(@root, f) },
+                 Dir.glob([@root, File.join(@root, "*")], sort: true))
     assert_raise_with_message(ArgumentError, /nul-separated/) do
       Dir.glob(@root + "\0\0\0" + File.join(@root, "*"))
     end
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]