version 1.1.1.1, 2012/02/21 23:38:00
|
version 1.1.1.2, 2014/06/15 19:53:34
|
Line 12 doc = ctxt.doc()
|
Line 12 doc = ctxt.doc()
|
valid = ctxt.isValid() |
valid = ctxt.isValid() |
|
|
if doc.name != "valid.xml": |
if doc.name != "valid.xml": |
print "doc.name failed" | print("doc.name failed") |
sys.exit(1) |
sys.exit(1) |
root = doc.children |
root = doc.children |
if root.name != "doc": |
if root.name != "doc": |
print "root.name failed" | print("root.name failed") |
sys.exit(1) |
sys.exit(1) |
if valid != 1: |
if valid != 1: |
print "validity chec failed" | print("validity chec failed") |
sys.exit(1) |
sys.exit(1) |
doc.freeDoc() |
doc.freeDoc() |
|
|
Line 32 while i > 0:
|
Line 32 while i > 0:
|
valid = ctxt.isValid() |
valid = ctxt.isValid() |
doc.freeDoc() |
doc.freeDoc() |
if valid != 1: |
if valid != 1: |
print "validity check failed" | print("validity check failed") |
sys.exit(1) |
sys.exit(1) |
i = i - 1 |
i = i - 1 |
|
|
Line 48 ctxt.parseDocument()
|
Line 48 ctxt.parseDocument()
|
doc = ctxt.doc() |
doc = ctxt.doc() |
valid = ctxt.isValid() |
valid = ctxt.isValid() |
if doc.name != "invalid.xml": |
if doc.name != "invalid.xml": |
print "doc.name failed" | print("doc.name failed") |
sys.exit(1) |
sys.exit(1) |
root = doc.children |
root = doc.children |
if root.name != "doc": |
if root.name != "doc": |
print "root.name failed" | print("root.name failed") |
sys.exit(1) |
sys.exit(1) |
if valid != 0: |
if valid != 0: |
print "validity chec failed" | print("validity chec failed") |
sys.exit(1) |
sys.exit(1) |
doc.freeDoc() |
doc.freeDoc() |
|
|
Line 68 while i > 0:
|
Line 68 while i > 0:
|
valid = ctxt.isValid() |
valid = ctxt.isValid() |
doc.freeDoc() |
doc.freeDoc() |
if valid != 0: |
if valid != 0: |
print "validity check failed" | print("validity check failed") |
sys.exit(1) |
sys.exit(1) |
i = i - 1 |
i = i - 1 |
del ctxt |
del ctxt |
Line 76 del ctxt
|
Line 76 del ctxt
|
# Memory debug specific |
# Memory debug specific |
libxml2.cleanupParser() |
libxml2.cleanupParser() |
if libxml2.debugMemory(1) == 0: |
if libxml2.debugMemory(1) == 0: |
print "OK" | print("OK") |
else: |
else: |
print "Memory leak %d bytes" % (libxml2.debugMemory(1)) | print("Memory leak %d bytes" % (libxml2.debugMemory(1))) |
libxml2.dumpMemory() |
libxml2.dumpMemory() |