#
# This test exercise the redirection of error messages with a
# functions defined in Python.
#
import sys
import libxml2
# Memory debug specific
expect="""--> (3) xmlns: URI foo is not absolute
--> (4) Opening and ending tag mismatch: x line 0 and y
"""
global err
s = """<x xmlns="foo"></y>"""
print "getErrorHandler failed"
parserCtxt = None
print "error"
print "received %s" %(err)
print "expected %s" %(expect)
i = 10000
while i > 0:
parserCtxt = None
i = i - 1
# Memory debug specific
print "OK"
else: