diff options
| author | Jess Robinson <[email protected]> | 2012-04-23 12:15:00 +0100 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2012-04-25 13:54:17 -0700 |
| commit | bb2df42ddaa64ab5116f3ffc5fe5810cccf6ce35 (patch) | |
| tree | 2d81dc511257359569396f5a06a8c98f1457cc30 | |
| parent | fae214e328bdf48d784aba1a24d74526784bb33c (diff) | |
Merges and final tests (pseudopod)pseudopod
| m--------- | templates | 10 | ||||
| -rw-r--r-- | tests/tables.pseudopod (renamed from tests/tables.pod) | 0 | ||||
| -rw-r--r-- | tests/writer.pseudopod | 1112 |
3 files changed, 1117 insertions, 5 deletions
diff --git a/templates b/templates -Subproject c819cf2149b8e0248a133ac5e40c8d4eaca7fc7 +Subproject 4594c7eeaee4e82237d4c52f011441143ad321d diff --git a/tests/tables.pod b/tests/tables.pseudopod index f5e943974..f5e943974 100644 --- a/tests/tables.pod +++ b/tests/tables.pseudopod 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<embedded link|/url> + +=head3 Level 3 with B<emphasis> + +=head4 Level 4 + +=head5 Level 5 + +=head1 Level 1 + +=head2 Level 2 with B<emphasis> + +=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<gt> 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<apple> + +red fruit + +contains seeds, crisp, pleasant to taste + +=item B<orange> + +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: + +<div> +foo +</div> + +And nested without indentation: + +<div> +<div> +<div> +foo +</div> +</div> +<div> +bar +</div> +</div> + +Interpreted markdown in a table: + +<table> +<tr> +<td> +This is B<emphasized> +</td> +<td> +And this is B<strong> +</td> +</tr> +</table> + +<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script> + +Here’s a simple block: + +<div> + +foo +</div> + +This should be a code block, though: + + <div> + foo + </div> + +As should this: + + <div>foo</div> + +Now, nested: + +<div> + <div> + <div> + +foo +</div> + </div> +</div> + +This should just be an HTML comment: + +<!-- Comment --> + +Multiline: + +<!-- +Blah +Blah +--> + +<!-- + This is another comment. +--> + +Code block: + + <!-- Comment --> + +Just plain comment, with trailing spaces on the line: + +<!-- foo --> + +Code: + + <hr /> + +Hr’s: + +<hr> + +<hr /> + +<hr /> + +<hr> + +<hr /> + +<hr /> + +<hr class="foo" id="bar" /> + +<hr class="foo" id="bar" /> + +<hr class="foo" id="bar"> + +=head1 Inline Markup + +This is B<emphasized>, and so B<is this>. + +This is B<strong>, and so B<is this>. + +An B<L<emphasized link|/url>>. + +B<B<This is strong and em.>> + +So is B<B<this>> word. + +B<B<This is strong and em.>> + +So is B<B<this>> word. + +This is code: C<< E<gt> >>, C<< $ >>, C<< \ >>, C<< \$ >>, +C<< <htmlE<gt> >>. + +This is B<strikeout>. + +Superscripts: aG<bc>d aG<B<hello>> aG<hello there>. + +Subscripts: HH<2>O, HH<23>O, HH<many of them>O. + +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<quoted +link|http://example.com/?foo=1&bar=2>”. + +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<lot> 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<gt> 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: E<gt> + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +=head1 Links + +=head2 Explicit + +Just a L<URL|/url/>. + +L<URL and title|/url/>. + +L<URL and title|/url/>. + +L<URL and title|/url/>. + +L<URL and title|/url/> + +L<URL and title|/url/> + +L<with_underscore|/url/with_underscore> + +L<Email link|mailto:[email protected]> + +L<Empty|>. + +=head2 Reference + +Foo L<bar|/url/>. + +Foo L<bar|/url/>. + +Foo L<bar|/url/>. + +With L<embedded [brackets]|/url/>. + +L<b|/url/> by itself should be a link. + +Indented L<once|/url>. + +Indented L<twice|/url>. + +Indented L<thrice|/url>. + +This should [not][] be a link. + + [not]: /url + +Foo L<bar|/url/>. + +Foo L<biz|/url/>. + +=head2 With ampersands + +Here’s a L<link with an ampersand in the +URL|http://example.com/?foo=1&bar=2>. + +Here’s a link with an amersand in the link text: +L<AT&T|http://att.com/>. + +Here’s an L<inline link|/script?foo=1&bar=2>. + +Here’s an L<inline link in pointy braces|/script?foo=1&bar=2>. + +=head2 Autolinks + +With an ampersand: +L<C<< http://example.com/?foo=1&bar=2 >>|http://example.com/?foo=1&bar=2> + +=over + +=item * + +In a list? + +=item * + +L<C<< http://example.com/ >>|http://example.com/> + +=item * + +It should. + +=back + +An e-mail address: +L<C<< [email protected] >>|mailto:[email protected]> + +=begin blockquote + +Blockquoted: L<C<< http://example.com/ >>|http://example.com/> + +=end blockquote + +Auto-links should not occur here: C<< <http://example.com/E<gt> >> + + or here: <http://example.com/> + +=head1 Images + +From “Voyage dans la Lune” by Georges Melies (1902): + +!L<lalune|lalune.jpg> + +Here is a movie !L<movie|movie.jpg> icon. + +=head1 Footnotes + +Here is a footnote reference,N<Here is the footnote. It can go anywhere +after the footnote reference. It need not be placed at the end of the +document. + +> and another.N<Here’s the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote +(as with list items). + + { <code> } + +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<not> be a footnote reference, because it contains a +space.[^my note] Here is an inline note.N<This is B<easier> to type. +Inline notes may contain L<links|http://google.com> and C<< ] >> +verbatim characters, as well as [bracketed text]. + +> + +=begin blockquote + +Notes can go in quotes.N<In quote. + +> + +=end blockquote + +=over + +=item 1. + +And in list items.N<In list. + +> + +=back + +This paragraph should not be part of the note, as it is not indented. |
