summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2017-10-06 14:41:07 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2017-10-06 14:41:07 +0000
commit07589f592f046e6c99d60bac4765558f9b054f7b (patch)
treeaf6a44435d50670b4066d0cd83a523b2202344b5 /docutils/test
parentc431f3482c62b0a217a5a5940d4b59dcf12e1a89 (diff)
downloaddocutils-07589f592f046e6c99d60bac4765558f9b054f7b.tar.gz
Apply [ 121 ] Add a :width: option for the table directives.
Thanks to Brecht Machiels for the patch. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8184 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_directives/test_tables.py69
1 files changed, 69 insertions, 0 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
index 6d2867767..5a1d1f874 100755
--- a/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
+++ b/docutils/test/test_parsers/test_rst/test_directives/test_tables.py
@@ -192,6 +192,75 @@ totest['table'] = [
"""],
["""\
.. table::
+ :width: 100 %
+
+ ============ ==============
+ col 1 col 2
+ ============ ==============
+""",
+"""\
+<document source="test data">
+ <table width="100%">
+ <tgroup cols="2">
+ <colspec colwidth="12">
+ <colspec colwidth="14">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ col 1
+ <entry>
+ <paragraph>
+ col 2
+"""],
+["""\
+.. table::
+ :width: 100px
+
+ ============ ==============
+ col 1 col 2
+ ============ ==============
+""",
+"""\
+<document source="test data">
+ <table width="100px">
+ <tgroup cols="2">
+ <colspec colwidth="12">
+ <colspec colwidth="14">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ col 1
+ <entry>
+ <paragraph>
+ col 2
+"""],
+["""\
+.. table::
+ :width: 321
+
+ ============ ==============
+ col 1 col 2
+ ============ ==============
+""",
+"""\
+<document source="test data">
+ <table width="321">
+ <tgroup cols="2">
+ <colspec colwidth="12">
+ <colspec colwidth="14">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ col 1
+ <entry>
+ <paragraph>
+ col 2
+"""],
+["""\
+.. table::
:widths: 15, 25
============ ==============