#! /usr/bin/env python # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 1588 $ # Date: $Date: 2005-10-06 10:35:16 -0500 (Thu, 06 Oct 2005) $ # Copyright: This module has been placed in the public domain. """ Tests for states.py. """ from __init__ import DocutilsTestSupport def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s totest = {} totest['block_quotes'] = [ ["""\ Line 1. Line 2. Indented. """, """\ Line 1. Line 2. Indented. """], ["""\ Line 1. Line 2. Indented 1. Indented 2. """, """\ Line 1. Line 2. Indented 1. Indented 2. """], ["""\ Line 1. Line 2. Unexpectedly indented. """, """\ Line 1. Line 2. Unexpected indentation. Unexpectedly indented. """], ["""\ Line 1. Line 2. Indented. no blank line """, """\ Line 1. Line 2. Indented. Block quote ends without a blank line; unexpected unindent. no blank line """], ["""\ Here is a paragraph. Indent 8 spaces. Indent 4 spaces. Is this correct? Should it generate a warning? Yes, it is correct, no warning necessary. """, """\ Here is a paragraph. Indent 8 spaces. Indent 4 spaces. Is this correct? Should it generate a warning? Yes, it is correct, no warning necessary. """], ["""\ Paragraph. Block quote. -- Attribution Paragraph. Block quote. --Attribution """, """\ Paragraph. Block quote. Attribution Paragraph. Block quote. Attribution """], [u"""\ Alternative: true em-dash. Block quote. \u2014 Attribution Alternative: three hyphens. Block quote. --- Attribution """, """\ Alternative: true em-dash. Block quote. Attribution Alternative: three hyphens. Block quote. Attribution """], ["""\ Paragraph. Block quote. -- Attribution line one and line two Paragraph. Block quote. -- Attribution line one and line two """, """\ Paragraph. Block quote. Attribution line one and line two Paragraph. Block quote. Attribution line one and line two """], ["""\ Paragraph. -- Not an attribution Paragraph. Block quote. \-- Not an attribution Paragraph. Block quote. -- Not an attribution line one and line two and line three """, """\ Paragraph. -- Not an attribution Paragraph. Block quote. -- Not an attribution Paragraph. Block quote. -- Not an attribution line one and line two and line three """], ] if __name__ == '__main__': import unittest unittest.main(defaultTest='suite')