diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-11-05 10:20:02 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-11-05 10:20:02 +0900 |
commit | f62f020f5654297c1a876ab7e9f93afbfe879f1d (patch) | |
tree | 6e198e1d12240878ab78cbcb5f9152e7ca61b510 /test/ruby/test_dir.rb | |
parent | 1ce3706c58e1f70c758e616012a982f058bce24e (diff) |
Add the test of `Dir.glob` when `sort: true` is given explicitly
Diffstat (limited to 'test/ruby/test_dir.rb')
-rw-r--r-- | test/ruby/test_dir.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 71bff5f5c3..3e03d7c7bc 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -171,6 +171,8 @@ class TestDir < Test::Unit::TestCase 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 |