summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-04-04 17:05:37 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-04-04 17:05:37 +0000
commitb4d89cccc3f3901bb15b38b1b2dd65224f23b44b (patch)
tree5a125bfd39f0c4b7dbed376a0f600de08348be45 /docutils/test
parent7e51fe21f5eeb02ac3c7109ddb2a17096e8bb3fb (diff)
downloaddocutils-b4d89cccc3f3901bb15b38b1b2dd65224f23b44b.tar.gz
added the "field_name_limit" setting, test & docs
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3164 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rw-r--r--docutils/test/functional/expected/field_name_limit.html28
-rw-r--r--docutils/test/functional/input/field_list.txt5
-rw-r--r--docutils/test/functional/tests/field_name_limit.py12
3 files changed, 45 insertions, 0 deletions
diff --git a/docutils/test/functional/expected/field_name_limit.html b/docutils/test/functional/expected/field_name_limit.html
new file mode 100644
index 000000000..f5e7aaa78
--- /dev/null
+++ b/docutils/test/functional/expected/field_name_limit.html
@@ -0,0 +1,28 @@
+<?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">
+<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></title>
+<link rel="stylesheet" href="default.css" type="text/css" />
+</head>
+<body>
+<div class="document">
+<table class="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">short:</th><td class="field-body">This field's name is short.</td>
+</tr>
+<tr class="field"><th class="field-name">medium-length:</th><td class="field-body">This field's name is medium-length.</td>
+</tr>
+<tr class="field"><th class="field-name">long field name:</th><td class="field-body">This field's name is long.</td>
+</tr>
+<tr class="field"><th class="field-name">very very long field name:</th><td class="field-body">This field's name is quite long.</td>
+</tr>
+</tbody>
+</table>
+</div>
+</body>
+</html>
diff --git a/docutils/test/functional/input/field_list.txt b/docutils/test/functional/input/field_list.txt
new file mode 100644
index 000000000..fa04ba6ca
--- /dev/null
+++ b/docutils/test/functional/input/field_list.txt
@@ -0,0 +1,5 @@
+:short: This field's name is short.
+:medium-length: This field's name is medium-length.
+:long field name: This field's name is long.
+:very very long field name:
+ This field's name is quite long.
diff --git a/docutils/test/functional/tests/field_name_limit.py b/docutils/test/functional/tests/field_name_limit.py
new file mode 100644
index 000000000..db79d4c67
--- /dev/null
+++ b/docutils/test/functional/tests/field_name_limit.py
@@ -0,0 +1,12 @@
+# Source and destination file names.
+test_source = "field_list.txt"
+test_destination = "field_name_limit.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "html"
+
+# Settings
+settings_overrides['field_name_limit'] = 0 # no limit
+settings_overrides['docinfo_xform'] = 0