VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/python/tests/tst.py@ 105420

Last change on this file since 105420 was 105420, checked in by vboxsync, 7 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 582 bytes
Line 
1#!/usr/bin/env python3
2import sys
3import setup_test
4import libxml2
5
6# Memory debug specific
7libxml2.debugMemory(1)
8
9doc = libxml2.parseFile("tst.xml")
10if doc.name != "tst.xml":
11 print("doc.name failed")
12 sys.exit(1)
13root = doc.children
14if root.name != "doc":
15 print("root.name failed")
16 sys.exit(1)
17child = root.children
18if child.name != "foo":
19 print("child.name failed")
20 sys.exit(1)
21doc.freeDoc()
22
23# Memory debug specific
24libxml2.cleanupParser()
25if libxml2.debugMemory(1) == 0:
26 print("OK")
27else:
28 print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette