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 | e70e2c9388d4afac2ae93cea37f29162b57d4403 (patch) | |
| tree | 03bc3dc8309c642e7fd3faa904058c1ec2f17b96 /test/ruby | |
| parent | ab8c535ea3b24f9e6a1f65bc0eb8c41475e4da47 (diff) | |
* test/ruby/test_path.rb (test_extname): test for r19596.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 7b644727db..294d2998cb 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 |
