From bb2df42ddaa64ab5116f3ffc5fe5810cccf6ce35 Mon Sep 17 00:00:00 2001 From: Jess Robinson Date: Mon, 23 Apr 2012 12:15:00 +0100 Subject: Merges and final tests (pseudopod) --- templates | 2 +- tests/tables.pod | 297 ------------- tests/tables.pseudopod | 297 +++++++++++++ tests/writer.pseudopod | 1112 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1410 insertions(+), 298 deletions(-) delete mode 100644 tests/tables.pod create mode 100644 tests/tables.pseudopod create mode 100644 tests/writer.pseudopod diff --git a/templates b/templates index c819cf214..4594c7eea 160000 --- a/templates +++ b/templates @@ -1 +1 @@ -Subproject commit c819cf2149b8e0248a133ac5e40c8d4eaca7fc76 +Subproject commit 4594c7eeaee4e82237d4c52f011441143ad321d8 diff --git a/tests/tables.pod b/tests/tables.pod deleted file mode 100644 index f5e943974..000000000 --- a/tests/tables.pod +++ /dev/null @@ -1,297 +0,0 @@ -=encoding utf8 - -Simple table with caption: - -=begin table Demonstration of simple table syntax. - -=headrow - -=row - -=cell Right - -=cell Left - -=cell Center - -=cell Default - -=bodyrows - -=row - -=cell 12 - -=cell 12 - -=cell 12 - -=cell 12 - -=row - -=cell 123 - -=cell 123 - -=cell 123 - -=cell 123 - -=row - -=cell 1 - -=cell 1 - -=cell 1 - -=cell 1 - -=end table - -Simple table without caption: - -=begin table - -=headrow - -=row - -=cell Right - -=cell Left - -=cell Center - -=cell Default - -=bodyrows - -=row - -=cell 12 - -=cell 12 - -=cell 12 - -=cell 12 - -=row - -=cell 123 - -=cell 123 - -=cell 123 - -=cell 123 - -=row - -=cell 1 - -=cell 1 - -=cell 1 - -=cell 1 - -=end table - -Simple table indented two spaces: - -=begin table Demonstration of simple table syntax. - -=headrow - -=row - -=cell Right - -=cell Left - -=cell Center - -=cell Default - -=bodyrows - -=row - -=cell 12 - -=cell 12 - -=cell 12 - -=cell 12 - -=row - -=cell 123 - -=cell 123 - -=cell 123 - -=cell 123 - -=row - -=cell 1 - -=cell 1 - -=cell 1 - -=cell 1 - -=end table - -Multiline table with caption: - -=begin table Here's the caption. It may span multiple lines. - -=headrow - -=row - -=cell Centered Header - -=cell Left Aligned - -=cell Right Aligned - -=cell Default aligned - -=bodyrows - -=row - -=cell First - -=cell row - -=cell 12.0 - -=cell Example of a row that spans multiple lines. - -=row - -=cell Second - -=cell row - -=cell 5.0 - -=cell Here's another one. Note the blank line between rows. - -=end table - -Multiline table without caption: - -=begin table - -=headrow - -=row - -=cell Centered Header - -=cell Left Aligned - -=cell Right Aligned - -=cell Default aligned - -=bodyrows - -=row - -=cell First - -=cell row - -=cell 12.0 - -=cell Example of a row that spans multiple lines. - -=row - -=cell Second - -=cell row - -=cell 5.0 - -=cell Here's another one. Note the blank line between rows. - -=end table - -Table without column headers: - -=begin table - -=bodyrows - -=row - -=cell 12 - -=cell 12 - -=cell 12 - -=cell 12 - -=row - -=cell 123 - -=cell 123 - -=cell 123 - -=cell 123 - -=row - -=cell 1 - -=cell 1 - -=cell 1 - -=cell 1 - -=end table - -Multiline table without column headers: - -=begin table - -=bodyrows - -=row - -=cell First - -=cell row - -=cell 12.0 - -=cell Example of a row that spans multiple lines. - -=row - -=cell Second - -=cell row - -=cell 5.0 - -=cell Here's another one. Note the blank line between rows. - -=end table diff --git a/tests/tables.pseudopod b/tests/tables.pseudopod new file mode 100644 index 000000000..f5e943974 --- /dev/null +++ b/tests/tables.pseudopod @@ -0,0 +1,297 @@ +=encoding utf8 + +Simple table with caption: + +=begin table Demonstration of simple table syntax. + +=headrow + +=row + +=cell Right + +=cell Left + +=cell Center + +=cell Default + +=bodyrows + +=row + +=cell 12 + +=cell 12 + +=cell 12 + +=cell 12 + +=row + +=cell 123 + +=cell 123 + +=cell 123 + +=cell 123 + +=row + +=cell 1 + +=cell 1 + +=cell 1 + +=cell 1 + +=end table + +Simple table without caption: + +=begin table + +=headrow + +=row + +=cell Right + +=cell Left + +=cell Center + +=cell Default + +=bodyrows + +=row + +=cell 12 + +=cell 12 + +=cell 12 + +=cell 12 + +=row + +=cell 123 + +=cell 123 + +=cell 123 + +=cell 123 + +=row + +=cell 1 + +=cell 1 + +=cell 1 + +=cell 1 + +=end table + +Simple table indented two spaces: + +=begin table Demonstration of simple table syntax. + +=headrow + +=row + +=cell Right + +=cell Left + +=cell Center + +=cell Default + +=bodyrows + +=row + +=cell 12 + +=cell 12 + +=cell 12 + +=cell 12 + +=row + +=cell 123 + +=cell 123 + +=cell 123 + +=cell 123 + +=row + +=cell 1 + +=cell 1 + +=cell 1 + +=cell 1 + +=end table + +Multiline table with caption: + +=begin table Here's the caption. It may span multiple lines. + +=headrow + +=row + +=cell Centered Header + +=cell Left Aligned + +=cell Right Aligned + +=cell Default aligned + +=bodyrows + +=row + +=cell First + +=cell row + +=cell 12.0 + +=cell Example of a row that spans multiple lines. + +=row + +=cell Second + +=cell row + +=cell 5.0 + +=cell Here's another one. Note the blank line between rows. + +=end table + +Multiline table without caption: + +=begin table + +=headrow + +=row + +=cell Centered Header + +=cell Left Aligned + +=cell Right Aligned + +=cell Default aligned + +=bodyrows + +=row + +=cell First + +=cell row + +=cell 12.0 + +=cell Example of a row that spans multiple lines. + +=row + +=cell Second + +=cell row + +=cell 5.0 + +=cell Here's another one. Note the blank line between rows. + +=end table + +Table without column headers: + +=begin table + +=bodyrows + +=row + +=cell 12 + +=cell 12 + +=cell 12 + +=cell 12 + +=row + +=cell 123 + +=cell 123 + +=cell 123 + +=cell 123 + +=row + +=cell 1 + +=cell 1 + +=cell 1 + +=cell 1 + +=end table + +Multiline table without column headers: + +=begin table + +=bodyrows + +=row + +=cell First + +=cell row + +=cell 12.0 + +=cell Example of a row that spans multiple lines. + +=row + +=cell Second + +=cell row + +=cell 5.0 + +=cell Here's another one. Note the blank line between rows. + +=end table diff --git a/tests/writer.pseudopod b/tests/writer.pseudopod new file mode 100644 index 000000000..b96a8e8c5 --- /dev/null +++ b/tests/writer.pseudopod @@ -0,0 +1,1112 @@ +This is a set of tests for pandoc. Most of them are adapted from John +Gruber’s markdown test suite. + +=head1 Headers + +=head2 Level 2 with an L + +=head3 Level 3 with B + +=head4 Level 4 + +=head5 Level 5 + +=head1 Level 1 + +=head2 Level 2 with B + +=head3 Level 3 + +with no blank line + +=head2 Level 2 + +with no blank line + +=head1 Paragraphs + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list +item. Because a hard-wrapped line in the middle of a paragraph looked +like a list item. + +Here’s one with a bullet. * criminey. + +There should be a hard line break\ +here. + +=head1 Block Quotes + +E-mail style: + +=begin blockquote + +This is a block quote. It is pretty short. + +=end blockquote + +=begin blockquote + +Code in a block quote: + + sub status { + print "working"; + } + +A list: + +=over + +=item 1. + +item one + +=item 2. + +item two + +=back + +Nested block quotes: + +=begin blockquote + +nested + +=end blockquote + +=begin blockquote + +nested + +=end blockquote + +=end blockquote + +This should not be a block quote: 2 E 1. + +And a following paragraph. + +=head1 Code Blocks + +Code: + + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab + +And: + + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ + +=head1 Lists + +=head2 Unordered + +Asterisks tight: + +=over + +=item * + +asterisk 1 + +=item * + +asterisk 2 + +=item * + +asterisk 3 + +=back + +Asterisks loose: + +=over + +=item * + +asterisk 1 + +=item * + +asterisk 2 + +=item * + +asterisk 3 + +=back + +Pluses tight: + +=over + +=item * + +Plus 1 + +=item * + +Plus 2 + +=item * + +Plus 3 + +=back + +Pluses loose: + +=over + +=item * + +Plus 1 + +=item * + +Plus 2 + +=item * + +Plus 3 + +=back + +Minuses tight: + +=over + +=item * + +Minus 1 + +=item * + +Minus 2 + +=item * + +Minus 3 + +=back + +Minuses loose: + +=over + +=item * + +Minus 1 + +=item * + +Minus 2 + +=item * + +Minus 3 + +=back + +=head2 Ordered + +Tight: + +=over + +=item 1. + +First + +=item 2. + +Second + +=item 3. + +Third + +=back + +and: + +=over + +=item 1. + +One + +=item 2. + +Two + +=item 3. + +Three + +=back + +Loose using tabs: + +=over + +=item 1. + +First + +=item 2. + +Second + +=item 3. + +Third + +=back + +and using spaces: + +=over + +=item 1. + +One + +=item 2. + +Two + +=item 3. + +Three + +=back + +Multiple paragraphs: + +=over + +=item 1. + +Item 1, graf one. + +Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + +=item 2. + +Item 2. + +=item 3. + +Item 3. + +=back + +=head2 Nested + +=over + +=item * + +Tab +=over + +=item * + +Tab +=over + +=item * + +Tab + +=back + +=back + +=back + +Here’s another: + +=over + +=item 1. + +First + +=item 2. + +Second: +=over + +=item * + +Fee + +=item * + +Fie + +=item * + +Foe + +=back + +=item 3. + +Third + +=back + +Same thing but with paragraphs: + +=over + +=item 1. + +First + +=item 2. + +Second: + +=over + +=item * + +Fee + +=item * + +Fie + +=item * + +Foe + +=back + +=item 3. + +Third + +=back + +=head2 Tabs and spaces + +=over + +=item * + +this is a list item indented with tabs + +=item * + +this is a list item indented with spaces + +=over + +=item * + +this is an example list item indented with tabs + +=item * + +this is an example list item indented with spaces + +=back + +=back + +=head2 Fancy list markers + +=over + +=item (2) + +begins with 2 + +=item (3) + +and now 3 + +with a continuation + +=over + +=item iv. + +sublist with roman numerals, starting with 4 + +=item v. + +more items +=over + +=item (A) + +a subsublist + +=item (B) + +a subsublist + +=back + +=back + +=back + +Nesting: + +=over + +=item A. + +Upper Alpha +=over + +=item I. + +Upper Roman. +=over + +=item (6) + +Decimal start with 6 +=over + +=item c) + +Lower alpha with paren + +=back + +=back + +=back + +=back + +Autonumbering: + +=over + +=item 1. + +Autonumber. + +=item 2. + +More. +=over + +=item 1. + +Nested. + +=back + +=back + +Should not be a list item: + +M.A. 2007 + +B. Williams + +=head1 Definition Lists + +Tight using spaces: + +=over + +=item apple + +red fruit + +=item orange + +orange fruit + +=item banana + +yellow fruit + +=back + +Tight using tabs: + +=over + +=item apple + +red fruit + +=item orange + +orange fruit + +=item banana + +yellow fruit + +=back + +Loose: + +=over + +=item apple + +red fruit + +=item orange + +orange fruit + +=item banana + +yellow fruit + +=back + +Multiple blocks with italics: + +=over + +=item B + +red fruit + +contains seeds, crisp, pleasant to taste + +=item B + +orange fruit + + { orange code block } + +=begin blockquote + +orange block quote + +=end blockquote + +=back + +Multiple definitions, tight: + +=over + +=item apple + +red fruit +computer + +=item orange + +orange fruit +bank + +=back + +Multiple definitions, loose: + +=over + +=item apple + +red fruit + +computer + +=item orange + +orange fruit + +bank + +=back + +Blank line after term, indented marker, alternate markers: + +=over + +=item apple + +red fruit + +computer + +=item orange + +orange fruit + +=over + +=item 1. + +sublist + +=item 2. + +sublist + +=back + +=back + +=head1 HTML Blocks + +Simple block on one line: + +
+foo +
+ +And nested without indentation: + +
+
+
+foo +
+
+
+bar +
+
+ +Interpreted markdown in a table: + + + + + + +
+This is B + +And this is B +
+ + + +Here’s a simple block: + +
+ +foo +
+ +This should be a code block, though: + +
+ foo +
+ +As should this: + +
foo
+ +Now, nested: + +
+
+
+ +foo +
+
+
+ +This should just be an HTML comment: + + + +Multiline: + + + + + +Code block: + + + +Just plain comment, with trailing spaces on the line: + + + +Code: + +
+ +Hr’s: + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +=head1 Inline Markup + +This is B, and so B. + +This is B, and so B. + +An B>. + +B> + +So is B> word. + +B> + +So is B> word. + +This is code: C<< E >>, C<< $ >>, C<< \ >>, C<< \$ >>, +C<< >>. + +This is B. + +Superscripts: aGd aG> aG. + +Subscripts: HH<2>O, HH<23>O, HHO. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. + +=head1 Smart quotes, ellipses, dashes + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘C<< code >>’ and a “L”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + +=head1 LaTeX + +=over + +=item * + +\cite[22-23]{smith.1899} + +=item * + +$2+2=4$ + +=item * + +$x \in y$ + +=item * + +$\alpha \wedge \omega$ + +=item * + +$223$ + +=item * + +$p$-Tree + +=item * + +Here’s some display math: +$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + +=item * + +Here’s one that has a line break in it: $\alpha + \omega \times x^2$. + +=back + +These shouldn’t be math: + +=over + +=item * + +To get the famous equation, write C<< $e = mc^2$ >>. + +=item * + +$22,000 is a B of money. So is $34,000. (It worked if “lot” is +emphasized.) + +=item * + +Shoes ($20) and socks ($5). + +=item * + +Escaped C<< $ >>: $73 *this should be emphasized* 23$. + +=back + +Here’s a LaTeX table: + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + +=head1 Special Characters + +Here is some unicode: + +=over + +=item * + +I hat: Î + +=item * + +o umlaut: ö + +=item * + +section: § + +=item * + +set membership: ∈ + +=item * + +copyright: © + +=back + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 E 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: E + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +=head1 Links + +=head2 Explicit + +Just a L. + +L. + +L. + +L. + +L + +L + +L + +L + +L. + +=head2 Reference + +Foo L. + +Foo L. + +Foo L. + +With L. + +L by itself should be a link. + +Indented L. + +Indented L. + +Indented L. + +This should [not][] be a link. + + [not]: /url + +Foo L. + +Foo L. + +=head2 With ampersands + +Here’s a L. + +Here’s a link with an amersand in the link text: +L. + +Here’s an L. + +Here’s an L. + +=head2 Autolinks + +With an ampersand: +L>|http://example.com/?foo=1&bar=2> + +=over + +=item * + +In a list? + +=item * + +L>|http://example.com/> + +=item * + +It should. + +=back + +An e-mail address: +L>|mailto:nobody@nowhere.net> + +=begin blockquote + +Blockquoted: L>|http://example.com/> + +=end blockquote + +Auto-links should not occur here: C<< >> + + or here: + +=head1 Images + +From “Voyage dans la Lune” by Georges Melies (1902): + +!L + +Here is a movie !L icon. + +=head1 Footnotes + +Here is a footnote reference,N and another.N } + +If you want, you can indent every line, but you can also be lazy and +just indent the first line of each block. + +> This should B be a footnote reference, because it contains a +space.[^my note] Here is an inline note.N to type. +Inline notes may contain L and C<< ] >> +verbatim characters, as well as [bracketed text]. + +> + +=begin blockquote + +Notes can go in quotes.N + +=end blockquote + +=over + +=item 1. + +And in list items.N + +=back + +This paragraph should not be part of the note, as it is not indented. -- cgit v1.2.3