Restore assertion that is not related mswin platform

This commit is contained in:
Hiroshi SHIBATA 2025-04-09 10:20:22 +09:00
parent ab4a25e48e
commit 9e93759b99
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -1278,9 +1278,9 @@ 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 # 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)}
# mswin allows rootdir and tmpdir are in different drives
assert_equal(rootdir, File.dirname(regular_file, regular_file.count('/'))) unless /mswin/ =~ RUBY_PLATFORM
end
def test_dirname_encoding