diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-03-14 17:06:53 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-03-14 17:06:53 +0000 |
| commit | b66ae6db64c88e31131e1640a34f8a9571c92d69 (patch) | |
| tree | 7c6d2fc9443f0c5e643abf6c5b154108ef7fbb9c | |
| parent | e113241b50a0041cb19112ac4aebf8fbcd6f8ba2 (diff) | |
| download | docutils-b66ae6db64c88e31131e1640a34f8a9571c92d69.tar.gz | |
added functional test for PEPs;
the resulting pep_html.html is not valid XHTML; could you have a look at it, David?
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3040 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
| -rw-r--r-- | docutils/test/functional/expected/pep_html.html | 75 | ||||
| -rw-r--r-- | docutils/test/functional/input/pep_html.txt | 23 | ||||
| -rw-r--r-- | docutils/test/functional/tests/pep_html.py | 16 |
3 files changed, 114 insertions, 0 deletions
diff --git a/docutils/test/functional/expected/pep_html.html b/docutils/test/functional/expected/pep_html.html new file mode 100644 index 000000000..26a0203be --- /dev/null +++ b/docutils/test/functional/expected/pep_html.html @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<!-- +This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new +PEP, see http://www.python.org/peps/pep-0001.html for instructions and links +to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! +--> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta name="generator" content="Docutils 0.3.8: http://docutils.sourceforge.net/" /> + <title>PEP 100 -- Test PEP</title> + <link rel="stylesheet" href="../../../tools/stylesheets/pep.css" type="text/css" /> +</head> +<body bgcolor="white"> +<table class="navigation" cellpadding="0" cellspacing="0" + width="100%" border="0"> +<tr><td class="navicon" width="150" height="35"> +<a href="http://www.python.org//" title="Python Home Page"> +<img src="http://www.python.org//pics/PyBanner000.gif" alt="[Python]" + border="0" width="150" height="35" /></a></td> +<td class="textlinks" align="left"> +[<b><a href="http://www.python.org//">Python Home</a></b>] +[<b><a href="http://www.python.org//peps/">PEP Index</a></b>] +[<b><a href="http://www.python.org/peps//pep-0100.txt">PEP Source</a></b>] +</td></tr></table> +<table class="rfc2822 docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">PEP:</th><td class="field-body">100</td> +</tr> +<tr class="field"><th class="field-name">Title:</th><td class="field-body">Test PEP</td> +</tr> +<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.9</td> +</tr> +<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/nondist/peps/pep-0100.txt">2004/06/05 02:55:11</a></td> +</tr> +<tr class="field"><th class="field-name">Author:</th><td class="field-body">John Doe <john at example.org></td> +</tr> +<tr class="field"><th class="field-name">Discussions-To:</th><td class="field-body"><<a class="reference" href="mailto:devnull@example.org?subject=PEP%20100">devnull at example.org</a>></td> +</tr> +<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> +</tr> +<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> +</tr> +<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="http://www.python.org/peps/pep-0012.html">text/x-rst</a></td> +</tr> +<tr class="field"><th class="field-name">Created:</th><td class="field-body">01-Jun-2001</td> +</tr> +<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">13-Jun-2001</td> +</tr> +</tbody> +</table> +<hr /> +<div class="contents topic" id="contents"> +<p class="topic-title first"><a name="contents">Contents</a></p> +<ul class="simple"> +<li><a class="reference" href="#abstract" id="id2" name="id2">Abstract</a></li> +<li><a class="reference" href="#copyright" id="id3" name="id3">Copyright</a></li> +</ul> +</div> +<div class="section" id="abstract"> +<h1><a class="toc-backref" href="#id2" name="abstract">Abstract</a></h1> +<p>Just a test.</p> +</div> +<div class="section" id="copyright"> +<h1><a class="toc-backref" href="#id3" name="copyright">Copyright</a></h1> +<p>This document has been placed in the public domain.</p> +</div> + +</div> +</body> +</html> + diff --git a/docutils/test/functional/input/pep_html.txt b/docutils/test/functional/input/pep_html.txt new file mode 100644 index 000000000..fb70328b2 --- /dev/null +++ b/docutils/test/functional/input/pep_html.txt @@ -0,0 +1,23 @@ +PEP: 100 +Title: Test PEP +Version: $Revision$ +Last-Modified: $Date$ +Author: John Doe <john@example.org> +Discussions-To: <devnull@example.org> +Status: Draft +Type: Standards Track +Content-Type: text/x-rst +Created: 01-Jun-2001 +Post-History: 13-Jun-2001 + + +Abstract +======== + +Just a test. + + +Copyright +========= + +This document has been placed in the public domain. diff --git a/docutils/test/functional/tests/pep_html.py b/docutils/test/functional/tests/pep_html.py new file mode 100644 index 000000000..6dd226522 --- /dev/null +++ b/docutils/test/functional/tests/pep_html.py @@ -0,0 +1,16 @@ +# Source and destination file names. +test_source = "pep_html.txt" +test_destination = "pep_html.html" + +# Keyword parameters passed to publish_file. +reader_name = "pep" +parser_name = "rst" +writer_name = "pep_html" + +# Settings +settings_overrides['stylesheet'] = None +settings_overrides['stylesheet_path'] = "../tools/stylesheets/pep.css" +settings_overrides['template'] = "../tools/pep-html-template" +settings_overrides['python_home'] = "http://www.python.org/" +settings_overrides['pep_home'] = "http://www.python.org/peps/" +settings_overrides['no_random'] = 1 |
