From 11bf869ee3e2e53fdbbb925a57cc2e8f95d48d97 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 7 Dec 2002 03:02:12 +0000 Subject: added git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1000 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/test/test_transforms/test_peps.py | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 docutils/test/test_transforms/test_peps.py (limited to 'docutils/test/test_transforms') diff --git a/docutils/test/test_transforms/test_peps.py b/docutils/test/test_transforms/test_peps.py new file mode 100644 index 000000000..28fa68af2 --- /dev/null +++ b/docutils/test/test_transforms/test_peps.py @@ -0,0 +1,68 @@ +#! /usr/bin/env python + +# Author: David Goodger +# Contact: goodger@users.sourceforge.net +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. + +""" +Tests for docutils.transforms.peps. +""" + +from __init__ import DocutilsTestSupport +from docutils.transforms.peps import TargetNotes +from docutils.parsers.rst import Parser + + +def suite(): + parser = Parser() + s = DocutilsTestSupport.TransformTestSuite(parser) + s.generateTests(totest) + return s + +totest = {} + +totest['target_notes'] = ((TargetNotes,), [ +["""\ +No references or targets exist, therefore +no "References" section should be generated. +""", +"""\ + + + No references or targets exist, therefore + no "References" section should be generated. +"""], +["""\ +A target exists, here's the reference_. +A "References" section should be generated. + +.. _reference: http://www.example.org +""", +"""\ + + + A target exists, here's the \n\ + + reference + \n\ + + . + A "References" section should be generated. + +
+ + References + <footnote auto="1" id="id2" name="target_note: id2"> + <paragraph> + <reference refuri="http://www.example.org"> + http://www.example.org +"""], +]) + + + +if __name__ == '__main__': + import unittest + unittest.main(defaultTest='suite') -- cgit v1.2.1