summaryrefslogtreecommitdiff
path: root/test/ruby/test_path.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 05:16:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 05:16:14 +0000
commitfaabbf230a026405feebf75a7cd9f4c0d9379d60 (patch)
tree0e690ca02113dde57c63774c89e3cda61cfd5f2f /test/ruby/test_path.rb
parentfe017d1450fbdd46fedef508e4bfa1377c7ca035 (diff)
* test/ruby/test_path.rb (test_extname): test for r19596.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_path.rb')
-rw-r--r--test/ruby/test_path.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb
index fb58f65561..24fc3a9d25 100644
--- a/test/ruby/test_path.rb
+++ b/test/ruby/test_path.rb
@@ -223,4 +223,13 @@ class TestPath < Test::Unit::TestCase
assert_equal('c', File.basename('///a/b/c'))
end
end
+
+ def test_extname
+ assert_equal('', File.extname('a'))
+ assert_equal('.rb', File.extname('a.rb'))
+ assert_equal('', File.extname('a.rb.'))
+ assert_equal('', File.extname('a.'))
+ assert_equal('', File.extname('.x'))
+ assert_equal('', File.extname('..x'))
+ end
end