~ubuntu-branches/ubuntu/jaunty/python-docutils/jaunty

« back to all changes in this revision

Viewing changes to test/test_rst/test_directives/test_unknown.py

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python
2
 
 
3
 
"""
4
 
:Author: David Goodger
5
 
:Contact: goodger@users.sourceforge.net
6
 
:Revision: $Revision: 1.2 $
7
 
:Date: $Date: 2002/04/25 03:41:58 $
8
 
:Copyright: This module has been placed in the public domain.
9
 
 
10
 
Tests for unknown directives.
11
 
"""
12
 
 
13
 
from __init__ import DocutilsTestSupport
14
 
 
15
 
def suite():
16
 
    s = DocutilsTestSupport.ParserTestSuite()
17
 
    s.generateTests(totest)
18
 
    return s
19
 
 
20
 
totest = {}
21
 
 
22
 
totest['unknown'] = [
23
 
["""\
24
 
.. reStructuredText-unknown-directive::
25
 
 
26
 
.. reStructuredText-unknown-directive:: argument
27
 
 
28
 
.. reStructuredText-unknown-directive::
29
 
   block
30
 
""",
31
 
"""\
32
 
<document>
33
 
    <system_message level="3" type="ERROR">
34
 
        <paragraph>
35
 
            Unknown directive type "reStructuredText-unknown-directive" at line 1.
36
 
        <literal_block>
37
 
            .. reStructuredText-unknown-directive::
38
 
    <system_message level="3" type="ERROR">
39
 
        <paragraph>
40
 
            Unknown directive type "reStructuredText-unknown-directive" at line 3.
41
 
        <literal_block>
42
 
            .. reStructuredText-unknown-directive:: argument
43
 
    <system_message level="3" type="ERROR">
44
 
        <paragraph>
45
 
            Unknown directive type "reStructuredText-unknown-directive" at line 5.
46
 
        <literal_block>
47
 
            .. reStructuredText-unknown-directive::
48
 
               block
49
 
"""],
50
 
]
51
 
 
52
 
 
53
 
if __name__ == '__main__':
54
 
    import unittest
55
 
    unittest.main(defaultTest='suite')