mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
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:
parent
d17ab5a430
commit
10d6ee6554
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue