diff options
Diffstat (limited to 'test/ruby/test_path.rb')
-rw-r--r-- | test/ruby/test_path.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb index 6af4fb6ac0..b35e942a2a 100644 --- a/test/ruby/test_path.rb +++ b/test/ruby/test_path.rb @@ -236,10 +236,14 @@ class TestPath < Test::Unit::TestCase assert_equal(ext, File.extname('.a/b/d/test.rb')) unless /mswin|bccwin|mingw/ =~ RUBY_PLATFORM # trailing spaces and dots are ignored on NTFS. - ext = '' + ext = '.' end assert_equal(ext, File.extname('a.rb.')) - assert_equal('', File.extname('a.')) + if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM + # trailing spaces and dots are ignored on NTFS. + ext = '' + end + assert_equal(ext, File.extname('a.')) assert_equal('', File.extname('.x')) assert_equal('', File.extname('..x')) end |