restore test un-intentionally removed in the xmlcore purge (revision 50941)

This commit is contained in:
Fred Drake 2006-07-29 18:19:19 +00:00
parent 956597f4ef
commit 9297e16907
1 changed files with 15 additions and 0 deletions

View File

@ -199,6 +199,21 @@ def parseliteral():
'body'
"""
def check_encoding(ET, encoding):
"""
>>> from xml.etree import ElementTree as ET
>>> check_encoding(ET, "ascii")
>>> check_encoding(ET, "us-ascii")
>>> check_encoding(ET, "iso-8859-1")
>>> check_encoding(ET, "iso-8859-15")
>>> check_encoding(ET, "cp437")
>>> check_encoding(ET, "mac-roman")
"""
ET.XML("<?xml version='1.0' encoding='%s'?><xml />" % encoding)
#
# xinclude tests (samples from appendix C of the xinclude specification)