VirtualBox

source: vbox/trunk/src/libs/libxml2-2.9.4/python/tests/xpathns.py@ 76900

Last change on this file since 76900 was 65950, checked in by vboxsync, 8 years ago

libxml 2.9.4: fix export

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 552 bytes
Line 
1#!/usr/bin/python -u
2#
3import libxml2
4
5expect=' xmlns:a="urn:whatevar"'
6
7# Memory debug specific
8libxml2.debugMemory(1)
9
10d = libxml2.parseDoc("<a:a xmlns:a='urn:whatevar'/>")
11res=""
12for n in d.xpathEval("//namespace::*"):
13 res = res + n.serialize()
14d.freeDoc()
15
16if res != expect:
17 print("test5 failed: unexpected output")
18 print(res)
19del res
20del d
21del n
22# Memory debug specific
23libxml2.cleanupParser()
24
25if libxml2.debugMemory(1) == 0:
26 print("OK")
27else:
28 print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
29 libxml2.dumpMemory()
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