Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
adds test for #89
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremybmerrill authored and jazzido committed Mar 8, 2015
1 parent 007334d commit ecf9d4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Binary file added test/data/gretna-owh-request.pdf
Binary file not shown.
16 changes: 16 additions & 0 deletions test/tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,22 @@ def test_issue78_some_ruling_lines_not_detected
end


def test_checks_for_text_on_page
pdf_file_path = File.expand_path('data/gretna-owh-request.pdf', File.dirname(__FILE__))
extractor = Tabula::Extraction::ObjectExtractor.new(pdf_file_path, [1])
extractor.extract.each do |pdf_page|
assert !pdf_page.has_text?
end
extractor.close!

pdf_file_path = File.expand_path('data/brazil_crop_area.pdf', File.dirname(__FILE__))
extractor = Tabula::Extraction::ObjectExtractor.new(pdf_file_path, [1])
extractor.extract.each do |pdf_page|
assert pdf_page.has_text?
end
extractor.close!
end

end

class TestIsTabularHeuristic < Minitest::Test
Expand Down

0 comments on commit ecf9d4e

Please sign in to comment.