Add line & column of the malformation in XML checks

This commit is contained in:
erwanlr
2013-03-12 15:12:32 +01:00
parent 0a50bcadc2
commit a298e431cc

View File

@@ -31,7 +31,7 @@ describe 'XSD checks' do
errors << error.message
end
errors.should === []
errors.should be_empty
end
it 'check plugin_vulns.xml for syntax errors' do
@@ -67,7 +67,7 @@ describe 'Well formed XML checks' do
begin
Nokogiri::XML(File.open(@file)) { |config| config.options = Nokogiri::XML::ParseOptions::STRICT }
rescue Nokogiri::XML::SyntaxError => e
fail "#{@file}: #{e.message}"
fail "#{@file}:#{e.line},#{e.column}: #{e.message}"
end
end