mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/options.rb: Added --page-dir option for moving pages in
doc/ to the top-level. * lib/rdoc/rdoc.rb: ditto. * test/rdoc/test_rdoc_options.rb: Test for the above. * test/rdoc/test_rdoc_rdoc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d5ba73e0d9
commit
b65b75bf2c
5 changed files with 107 additions and 1 deletions
|
@ -158,6 +158,25 @@ class TestRDocRDoc < RDoc::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_parse_file_page_dir
|
||||
@rdoc.store = RDoc::Store.new
|
||||
|
||||
temp_dir do |dir|
|
||||
FileUtils.mkdir 'pages'
|
||||
@rdoc.options.page_dir = Pathname('pages')
|
||||
@rdoc.options.root = Pathname(Dir.pwd)
|
||||
|
||||
open 'pages/test.txt', 'w' do |io|
|
||||
io.puts 'hi'
|
||||
end
|
||||
|
||||
top_level = @rdoc.parse_file 'pages/test.txt'
|
||||
|
||||
assert_equal 'pages/test.txt', top_level.absolute_name
|
||||
assert_equal 'test.txt', top_level.relative_name
|
||||
end
|
||||
end
|
||||
|
||||
def test_parse_file_relative
|
||||
pwd = Dir.pwd
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue