mirror of https://github.com/apache/lucene.git
adjust tests to work without libxml2
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@540702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
502b3248d6
commit
a74e62d8c3
|
@ -59,7 +59,7 @@ class DocumentTest < Test::Unit::TestCase
|
|||
def test_boost
|
||||
doc = Solr::Document.new :name => "McGrump"
|
||||
doc.boost = 300.28
|
||||
assert_match(/<doc boost=['"]300.28['"]>[\s]+<field name=['"]name['"]>McGrump<\/field>[\s]+<\/doc>/, doc.to_xml.to_s)
|
||||
assert_match(/<doc boost=['"]300.28['"]>[\s]*<field name=['"]name['"]>McGrump<\/field>[\s]*<\/doc>/, doc.to_xml.to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class RequestTest < Test::Unit::TestCase
|
|||
request = Solr::Request::Commit.new
|
||||
assert_equal :xml, request.response_format
|
||||
assert_equal 'update', request.handler
|
||||
assert_equal '<commit waitSearcher="true" waitFlush="true"/>', request.to_s
|
||||
assert_match(/<commit waitSearcher=["']true["'] waitFlush=["'']true["'']\/>/, request.to_s)
|
||||
end
|
||||
|
||||
def test_add_doc_request
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
begin
|
||||
require 'solr'
|
||||
require 'test/unit'
|
||||
require 'xml/libxml'
|
||||
|
||||
class XPathMapperTest < Test::Unit::TestCase
|
||||
|
||||
|
@ -31,3 +33,6 @@ class XPathMapperTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
end
|
||||
rescue LoadError => e
|
||||
puts "XPathMapperTest not run because #{e}"
|
||||
end
|
Loading…
Reference in New Issue