3
# Author: Felix Wiemann
4
# Contact: Felix_Wiemann@ososo.de
5
# Revision: $Revision: 3968 $
6
# Date: $Date: 2005-10-29 14:28:44 +0200 (Sat, 29 Oct 2005) $
7
# Copyright: This module has been placed in the public domain.
10
Miscellaneous HTML writer tests.
13
from __init__ import DocutilsTestSupport
14
from docutils import core
17
class EncodingTestCase(DocutilsTestSupport.StandardTestCase):
19
def test_xmlcharrefreplace(self):
20
# Test that xmlcharrefreplace is the default output encoding
23
'output_encoding': 'latin1',
25
'_disable_config': 1,}
26
result = core.publish_string(
27
'EUR = \xe2\x82\xac', writer_name='html4css1',
28
settings_overrides=settings_overrides)
29
# Encoding a euro sign with latin1 doesn't work, so the
30
# xmlcharrefreplcae handler is used.
31
self.assert_(result.find('EUR = €') != -1)
34
if __name__ == '__main__':