VirtualBox

source: vbox/trunk/src/libs/libxml2-2.12.6/python/tests/xpathns.py@ 105635

最後變更 在這個檔案從105635是 104106,由 vboxsync 提交於 10 月 前

libxml2-2.9.14: Applied and adjusted our libxml2 changes to 2.9.14. bugref:10640

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:executable 設為 *
檔案大小: 547 位元組
 
1#!/usr/bin/env python3
2#
3import setup_test
4import libxml2
5
6expect=' xmlns:a="urn:whatevar"'
7
8# Memory debug specific
9libxml2.debugMemory(1)
10
11d = libxml2.parseDoc("<a:a xmlns:a='urn:whatevar'/>")
12res=""
13for n in d.xpathEval("//namespace::*"):
14 res = res + n.serialize()
15del n
16d.freeDoc()
17
18if res != expect:
19 print("test5 failed: unexpected output")
20 print(res)
21del res
22del d
23# Memory debug specific
24libxml2.cleanupParser()
25
26if libxml2.debugMemory(1) == 0:
27 print("OK")
28else:
29 print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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