Added RTF table writer tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@600 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
61024d93ed
commit
aedc2095f5
2 changed files with 284 additions and 0 deletions
|
@ -86,6 +86,10 @@ print " docbook writer...";
|
|||
`$script -r native -w docbook tables.native > tmp.db`;
|
||||
test_results("docbook table writer", "tmp.db", "tables.db");
|
||||
|
||||
print " rtf writer...";
|
||||
`$script -r native -w rtf tables.native > tmp.rtf`;
|
||||
test_results("rtf table writer", "tmp.rtf", "tables.rtf");
|
||||
|
||||
print "\nReader tests:\n";
|
||||
|
||||
print "Testing markdown reader...";
|
||||
|
|
280
tests/tables.rtf
Normal file
280
tests/tables.rtf
Normal file
|
@ -0,0 +1,280 @@
|
|||
{\pard \ql \f0 \sa180 \li0 \fi0 Simple table with caption:\par}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2052\clbrdrb\brdrs\cellx3456\clbrdrb\brdrs\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 Right\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Left\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Center\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Default\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Simple table without caption:\par}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2052\clbrdrb\brdrs\cellx3456\clbrdrb\brdrs\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 Right\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Left\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Center\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Default\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Simple table indented two spaces:\par}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2052\clbrdrb\brdrs\cellx3456\clbrdrb\brdrs\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 Right\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Left\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Center\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Default\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 12\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 123\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2052\cellx3456\cellx4536
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 1\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table with caption:\par}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Centered Header\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Default aligned\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2484\cellx3888\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 First\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 row\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 12.0\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2484\cellx3888\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Second\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 row\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 5.0\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Here's another one. Note the blank line between rows.\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Here's the caption. It may span multiple lines.\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without caption:\par}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Centered Header\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Left Aligned\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 Right Aligned\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Default aligned\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2484\cellx3888\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 First\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 row\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 12.0\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{
|
||||
\trowd \trgaph120
|
||||
\cellx1296\cellx2484\cellx3888\cellx6804
|
||||
\trkeep\intbl
|
||||
{
|
||||
{\intbl {\pard \qc \f0 \sa0 \li0 \fi0 Second\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 row\par}
|
||||
\cell}
|
||||
{\intbl {\pard \qr \f0 \sa0 \li0 \fi0 5.0\par}
|
||||
\cell}
|
||||
{\intbl {\pard \ql \f0 \sa0 \li0 \fi0 Here's another one. Note the blank line between rows.\par}
|
||||
\cell}
|
||||
}
|
||||
\intbl\row}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
|
Loading…
Reference in a new issue