diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-01 05:16:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-01 05:16:14 +0000 |
commit | faabbf230a026405feebf75a7cd9f4c0d9379d60 (patch) | |
tree | 0e690ca02113dde57c63774c89e3cda61cfd5f2f /test | |
parent | fe017d1450fbdd46fedef508e4bfa1377c7ca035 (diff) | |
download | ruby-faabbf230a026405feebf75a7cd9f4c0d9379d60.tar.gz |
* 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')
-rw-r--r-- | test/ruby/test_path.rb | 9 |
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 |