diff options
| author | dkuhlman <dkuhlman@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-12-26 22:36:46 +0000 |
|---|---|---|
| committer | dkuhlman <dkuhlman@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-12-26 22:36:46 +0000 |
| commit | 6cb84267e468a50ce10ab317fe65b13ea749cca7 (patch) | |
| tree | 7ff4c21203324bf92fbfb0aec57789eeb2dd807b /docutils/test/functional | |
| parent | 00f11fd14a83f2dadfe60cde3f39b285b297ed6c (diff) | |
| download | docutils-6cb84267e468a50ce10ab317fe65b13ea749cca7.tar.gz | |
Added rst2odt/odtwriter to the main branch.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5834 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional')
| -rw-r--r-- | docutils/test/functional/expected/odt_basic.odt | bin | 0 -> 7400 bytes | |||
| -rw-r--r-- | docutils/test/functional/expected/odt_tables1.odt | bin | 0 -> 9504 bytes | |||
| -rw-r--r-- | docutils/test/functional/input/odt_basic.txt | 9 | ||||
| -rw-r--r-- | docutils/test/functional/input/odt_tables1.txt | 171 |
4 files changed, 180 insertions, 0 deletions
diff --git a/docutils/test/functional/expected/odt_basic.odt b/docutils/test/functional/expected/odt_basic.odt Binary files differnew file mode 100644 index 000000000..0691d2a33 --- /dev/null +++ b/docutils/test/functional/expected/odt_basic.odt diff --git a/docutils/test/functional/expected/odt_tables1.odt b/docutils/test/functional/expected/odt_tables1.odt Binary files differnew file mode 100644 index 000000000..7345c97ab --- /dev/null +++ b/docutils/test/functional/expected/odt_tables1.odt diff --git a/docutils/test/functional/input/odt_basic.txt b/docutils/test/functional/input/odt_basic.txt new file mode 100644 index 000000000..ee5a844dc --- /dev/null +++ b/docutils/test/functional/input/odt_basic.txt @@ -0,0 +1,9 @@ +===== +Test +===== + +Basic # 1 +========== + +A *simple* test. + diff --git a/docutils/test/functional/input/odt_tables1.txt b/docutils/test/functional/input/odt_tables1.txt new file mode 100644 index 000000000..838b75479 --- /dev/null +++ b/docutils/test/functional/input/odt_tables1.txt @@ -0,0 +1,171 @@ +================================================================================ +Grid test +================================================================================ + +Test 1 +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. + - contain + +| body row 4 | aaa | - body elements. | ++------------------------+------------+---------------------+ + +Test 2 +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++ +------------+----------+----------+ +| body row 2 | column 2 | column 3 | column 4 | ++------------------------+ +----------+----------+ +| body row 3 | may span | - Table cells | ++------------------------+------------+ - contain + +| body row 4 | column 2 | - body elements. | ++------------------------+------------+---------------------+ + + +Test 3 +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++ +------------+----------+ + +| body row 2 | column 2 | column 3 | may span | ++------------------------+------------+ +----------+ +| body row 3 | column 2 | may span | column 4 | ++------------------------+ +----------+----------+ +| body row 4 | may span | column 3 | column 4 | ++------------------------+------------+----------+----------+ + + +Test 4 +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++ +------------+----------+ + +| body row 2 | column 2 and column 3 | may span | ++------------------------+ +----------+ +| body row 3 | may span | column 4 | ++ +------------+----------+----------+ +| may span | may span | column 3 | column 4 | ++------------------------+------------+----------+----------+ + +Test 4a +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++ +------------+----------+ + +| body row 2 | column 2 and column 3 | may span | ++------------------------+ +----------+ +| body row 3 | may span | column 4 | ++ +------------+----------+----------+ +| may span | may span | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 4 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ + + + + + + + + +Test 5 +======= + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + + +Test 6 +======= + +Some care must be taken with grid tables to avoid undesired +interactions with cell text in rare cases. For example, the +following table contains a cell in row 2 spanning from column 2 to +column 4: + ++--------------+----------+-----------+-----------+ +| row 1, col 1 | column 2 | column 3 | column 4 | ++--------------+----------+-----------+-----------+ +| row 2 | | ++--------------+----------+-----------+-----------+ +| row 3 | | | | ++--------------+----------+-----------+-----------+ + +Test 7 +======= + +If a vertical bar is used in the text of that cell, it could have +unintended effects if accidentally aligned with column boundaries: + ++--------------+----------+-----------+-----------+ +| row 1, col 1 | column 2 | column 3 | column 4 | ++--------------+----------+-----------+-----------+ +| row 2 | Use the command ``ls \| more``. | ++--------------+----------+-----------+-----------+ +| row 3 | | | | ++--------------+----------+-----------+-----------+ + +Test 8 +======= + +Several solutions are possible. All that is needed is to break the +continuity of the cell outline rectangle. One possibility is to +shift the text by adding an extra space before: + + ++--------------+----------+-----------+-----------+ +| row 1, col 1 | column 2 | column 3 | column 4 | ++--------------+----------+-----------+-----------+ +| row 2 | Use the command ``ls | more``. | ++--------------+----------+-----------+-----------+ +| row 3 | | | | ++--------------+----------+-----------+-----------+ + +Test 9 +======= + +Another possibility is to add an extra line to row 2: + ++--------------+----------+-----------+-----------+ +| row 1, col 1 | column 2 | column 3 | column 4 | ++--------------+----------+-----------+-----------+ +| row 2 | Use the command ``ls | more``. | +| | | ++--------------+----------+-----------+-----------+ +| row 3 | | | | ++--------------+----------+-----------+-----------+ |
