From 7522a44b0a31b4f6f54f41b935fc475ff405e522 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Sat, 12 Jan 2013 19:27:07 +0100 Subject: [PATCH] Added syntax checks for the original XML files so travis can complain about syntax errors --- spec/xml_checks_spec.rb | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 spec/xml_checks_spec.rb diff --git a/spec/xml_checks_spec.rb b/spec/xml_checks_spec.rb new file mode 100644 index 00000000..ed5c25d7 --- /dev/null +++ b/spec/xml_checks_spec.rb @@ -0,0 +1,51 @@ +#-- +# WPScan - WordPress Security Scanner +# Copyright (C) 2012-2013 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#++ + +require 'spec_helper' + +describe "XML checks" do + + after :each do + full_path = "#{DATA_DIR}/#@file" + + FileTest.exists?(full_path).should be_true + + expect { Nokogiri::XML(File.read(full_path)) { |config| config.strict } }.to_not raise_error + + end + + it "check plugin_vulns.xml for syntax errors" do + @file = "plugin_vulns.xml" + end + + it "check theme_vulns.xml for syntax errors" do + @file = "theme_vulns.xml" + end + + it "check wp_versions.xml for syntax errors" do + @file = "wp_versions.xml" + end + + it "check wp_vulns.xml for syntax errors" do + @file = "wp_vulns.xml" + end + + it "check local_vulnerable_files.xml for syntax errors" do + @file = "local_vulnerable_files.xml" + end +end \ No newline at end of file