Skip to content

Commit

Permalink
(zdavatz#134) Try to find error
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Mar 19, 2021
1 parent 1d1234b commit bd21335
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/plugin/text_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,12 @@ def extract_html(meta_info)
FileUtils.makedirs(File.dirname(html_name))
File.open(html_name, 'w+:utf-8') {|f| f.write html }
call_xmllint(html_name, true)
LogFile.debug "IKSNR #{meta_info.iksnr}: File.size(#{html_name}) is #{File.size(html_name)}"
LogFile.debug "IKSNR #{meta_info.iksnr}: File.size(#{html_name}) is #{File.size(html_name)} != #{html.size} xml_file #{meta_info.xml_file} #{File.size(meta_info.xml_file)}"
if defined?(Minitest) # try to narrow down failure
cmd = "diff #{meta_info.xml_file} #{html_name}"
puts cmd
system(cmd)
end
end
m = /<style>(.*)<\/style>/.match(content)
styles = m ? m[1] : ''
Expand Down
3 changes: 1 addition & 2 deletions test/test_plugin/text_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,10 @@ def test_import_daily_packungen
puts @plugin.report
assert_equal(Nr_PI_in_AIPS_test, @plugin.updated_pis.size, "nr updated pis must match")
assert_equal(0, @plugin.up_to_date_pis, "up_to_date_pis must match")
assert_equal(Nr_PI_in_AIPS_test, @plugin.corrected_pis.size, "nr corrected_pis must match")

assert_equal(0, @plugin.corrected_fis.size, "nr corrected_fis must match")
assert_equal(0, @plugin.updated_fis.size, "nr updated fis must match")
assert_equal(0, @plugin.up_to_date_fis, "up_to_date_fis must match")
assert_equal(Nr_PI_in_AIPS_test, @plugin.corrected_pis.size, "nr corrected_pis must match")
end
end
end

0 comments on commit bd21335

Please sign in to comment.