diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-14 22:43:21 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-14 22:43:21 +0000 |
commit | c8633294c63ce3dcc9f80ec3b8afb30982338772 (patch) | |
tree | 84634d136484bd60dd9a4ccca6b9d51d9450ebca /test/rdoc | |
parent | 9deb82b1d9457997c34ebca25f2f985778c6c8fd (diff) | |
download | ruby-c8633294c63ce3dcc9f80ec3b8afb30982338772.tar.gz |
* lib/rdoc/top_level.rb: Fixed extension trimming for page names in
RDoc HTML output. [ruby-trunk - Bug #7673]
* test/rdoc/test_rdoc_top_level.rb: Test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_top_level.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_top_level.rb b/test/rdoc/test_rdoc_top_level.rb index 9c7a3db66f..99f7b22ae0 100644 --- a/test/rdoc/test_rdoc_top_level.rb +++ b/test/rdoc/test_rdoc_top_level.rb @@ -214,7 +214,7 @@ class TestRDocTopLevel < XrefTestCase def test_page_name assert_equal 'top_level', @top_level.page_name - tl = @store.add_file 'README.ja.rdoc' + tl = @store.add_file 'README.ja' assert_equal 'README.ja', tl.page_name @@ -223,6 +223,20 @@ class TestRDocTopLevel < XrefTestCase assert_equal 'Rakefile', tl.page_name end + def test_page_name_trim_extension + tl = @store.add_file 'README.ja.rdoc' + + assert_equal 'README.ja', tl.page_name + + tl = @store.add_file 'README.ja.md' + + assert_equal 'README.ja', tl.page_name + + tl = @store.add_file 'README.txt' + + assert_equal 'README', tl.page_name + end + def test_search_record assert_nil @xref_data.search_record end |