summaryrefslogtreecommitdiff
path: root/test/rdoc/test_rdoc_rdoc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_rdoc.rb')
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_rdoc.rb b/test/rdoc/test_rdoc_rdoc.rb
index 9a13569f01..b36e47398b 100644
--- a/test/rdoc/test_rdoc_rdoc.rb
+++ b/test/rdoc/test_rdoc_rdoc.rb
@@ -108,7 +108,13 @@ class TestRDocRDoc < RDoc::TestCase
end
def test_normalized_file_list
- files = @rdoc.normalized_file_list [__FILE__]
+ files = temp_dir do |dir|
+ flag_file = @rdoc.output_flag_file dir
+
+ FileUtils.touch flag_file
+
+ @rdoc.normalized_file_list [__FILE__, flag_file]
+ end
files = files.map { |file| File.expand_path file }
@@ -162,6 +168,23 @@ class TestRDocRDoc < RDoc::TestCase
end
end
+ def test_parse_file_binary
+ @rdoc.store = RDoc::Store.new
+
+ root = File.dirname __FILE__
+
+ @rdoc.options.root = Pathname root
+
+ out, err = capture_io do
+ Dir.chdir root do
+ assert_nil @rdoc.parse_file 'binary.dat'
+ end
+ end
+
+ assert_empty out
+ assert_empty err
+ end
+
def test_parse_file_include_root
@rdoc.store = RDoc::Store.new