aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_rdoc.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 07:44:56 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 07:44:56 +0000
commitb65b75bf2ce955dc8f5fb589732927acc8b72c29 (patch)
tree0e33d09bc3aeeef5c35dbf6fc404d7ab4658b9e8 /test/rdoc/test_rdoc_rdoc.rb
parentd5ba73e0d9fd2fb9d1c787247c8755fa8ccc8404 (diff)
downloadruby-b65b75bf2ce955dc8f5fb589732927acc8b72c29.tar.gz
* 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
Diffstat (limited to 'test/rdoc/test_rdoc_rdoc.rb')
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 643f1eff77..e29363a47a 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -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