Skip some assertions of TestFileExhaustive#test_dirname with Windows platform.

These assertions didn't handle drive letter of Windows

```
  1) Failure:
TestFileExhaustive#test_dirname [V:/github.com/ruby/ruby/test/ruby/test_file_exhaustive.rb:1282]:
<"V:/"> expected but was
<"C:/">.
```
This commit is contained in:
Hiroshi SHIBATA 2025-04-08 15:20:45 +09:00
parent d17ab5a430
commit 10d6ee6554
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -1278,7 +1278,7 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_equal(regular_file, File.dirname(regular_file, 0))
assert_equal(@dir, File.dirname(regular_file, 1))
assert_equal(File.dirname(@dir), File.dirname(regular_file, 2))
return if /mswin/ =~ RUBY_PLATFORM && ENV.key?('GITHUB_ACTIONS') # rootdir and tmpdir are in different drives
return if /mswin/ =~ RUBY_PLATFORM # mswin allows rootdir and tmpdir are in different drives
assert_equal(rootdir, File.dirname(regular_file, regular_file.count('/')))
assert_raise(ArgumentError) {File.dirname(regular_file, -1)}
end