Spelling fixes
[docutils.git] / test / test_parsers / test_rst / test_directives / test_replace_fr.py
blob6847c1c06a4e236379352816dc72076fba2dafe4
1 #! /usr/bin/env python
3 # $Id: test_replace.py 4667 2006-07-12 21:40:56Z wiemann $
4 # Author: David Goodger <goodger@python.org>
5 # Copyright: This module has been placed in the public domain.
7 """
8 Tests for misc.py "replace" directive.
9 Test in french (not default/fallback language).
10 """
12 from __init__ import DocutilsTestSupport
15 def suite():
16 s = DocutilsTestSupport.ParserTestSuite(suite_settings={'language_code':'fr'})
17 s.generateTests(totest)
18 return s
20 totest = {}
22 totest['replace'] = [
23 ["""\
24 Test directive containing french role exposant (superscript).
26 .. |Na+| remplace:: Na\ :exp:`+`
28 Le |Na+| est l'ion sodium.
29 """,
30 """\
31 <document source="test data">
32 <paragraph>
33 Test directive containing french role exposant (superscript).
34 <substitution_definition names="Na+">
36 <superscript>
38 <paragraph>
39 Le \n\
40 <substitution_reference refname="Na+">
41 Na+
42 est l\'ion sodium.
43 """],
44 ["""\
45 Test directive containing english role superscript.
47 .. |Na+| remplace:: Na\ :sup:`+`
49 Le |Na+| est l'ion sodium.
50 """,
51 """\
52 <document source="test data">
53 <paragraph>
54 Test directive containing english role superscript.
55 <system_message level="1" line="3" source="test data" type="INFO">
56 <paragraph>
57 No role entry for "sup" in module "docutils.parsers.rst.languages.fr".
58 Using English fallback for role "sup".
59 <substitution_definition names="Na+">
61 <superscript>
63 <paragraph>
64 Le \n\
65 <substitution_reference refname="Na+">
66 Na+
67 est l\'ion sodium."""],
71 if __name__ == '__main__':
72 import unittest
73 unittest.main(defaultTest='suite')