3
# Author: David Goodger
4
# Contact: goodger@python.org
5
# Revision: $Revision: 3184 $
6
# Date: $Date: 2005-04-07 21:36:11 +0200 (Thu, 07 Apr 2005) $
7
# Copyright: This module has been placed in the public domain.
10
Tests for the "header" & "footer" directives.
13
from __init__ import DocutilsTestSupport
16
s = DocutilsTestSupport.ParserTestSuite()
17
s.generateTests(totest)
24
.. header:: a paragraph for the header
27
<document source="test data">
31
a paragraph for the header
37
<document source="test data">
41
Problem with the "header" directive: no content supplied.
42
<system_message level="2" line="1" source="test data" type="WARNING">
44
Content block expected for the "header" directive; none found.
45
<literal_block xml:space="preserve">
49
.. header:: first part of the header
50
.. header:: second part of the header
53
<document source="test data">
57
first part of the header
59
second part of the header
65
.. footer:: a paragraph for the footer
68
<document source="test data">
72
a paragraph for the footer
75
.. footer:: even if a footer is declared first
76
.. header:: the header appears first
79
<document source="test data">
83
the header appears first
86
even if a footer is declared first
91
if __name__ == '__main__':
93
unittest.main(defaultTest='suite')