From 185f2b4fb839e4044c32afdbbbefd86f552a85a1 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 15 Dec 2005 14:32:01 +0000 Subject: fixed "compact" & "open" classes on lists, and added a functional test git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4219 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../test/functional/expected/compact_lists.html | 47 ++++++++++++++++++++++ docutils/test/functional/input/compact_lists.txt | 39 ++++++++++++++++++ docutils/test/functional/tests/compact_lists.py | 11 +++++ 3 files changed, 97 insertions(+) create mode 100644 docutils/test/functional/expected/compact_lists.html create mode 100644 docutils/test/functional/input/compact_lists.txt create mode 100644 docutils/test/functional/tests/compact_lists.py (limited to 'docutils/test/functional') diff --git a/docutils/test/functional/expected/compact_lists.html b/docutils/test/functional/expected/compact_lists.html new file mode 100644 index 000000000..968df354d --- /dev/null +++ b/docutils/test/functional/expected/compact_lists.html @@ -0,0 +1,47 @@ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + diff --git a/docutils/test/functional/input/compact_lists.txt b/docutils/test/functional/input/compact_lists.txt new file mode 100644 index 000000000..ec13a97be --- /dev/null +++ b/docutils/test/functional/input/compact_lists.txt @@ -0,0 +1,39 @@ +* This is an ordinary simple bullet list. +* It should be made compact (

&

tags omitted). + +********** + +* This is a bullet list that is not simple. + + There are multiple paragraphs in some items. + +* It should not be made compact. + +* Even though some items may have only one paragraph. + +********** + +.. class:: open + +* This is a simple bullet list, but class="open" is set. +* It should not be made compact. + +********** + +.. class:: compact + +* This is a bullet list that is not simple. + + There are multiple paragraphs in some items. + +* However, the class="compact" setting will cause + all first paragraph's

&

tags to be omitted. + +* Items with multiple paragraphs will not appear changed. + +* Items may have one paragraph, or multiple. + + Items with multiple paragraphs will still be followed + by vertical whitespace because of the later paragraphs. + +* The effect is interesting. diff --git a/docutils/test/functional/tests/compact_lists.py b/docutils/test/functional/tests/compact_lists.py new file mode 100644 index 000000000..3ac4c3f8b --- /dev/null +++ b/docutils/test/functional/tests/compact_lists.py @@ -0,0 +1,11 @@ +# Source and destination file names. +test_source = "compact_lists.txt" +test_destination = "compact_lists.html" + +# Keyword parameters passed to publish_file. +reader_name = "standalone" +parser_name = "rst" +writer_name = "html" + +# Settings +#settings_overrides['key'] = -- cgit v1.2.1