John MacFarlane
90647a56f6
Updated tests for new HTML format.
...
Verified against old tests using tidy and diff.
2011-02-04 20:38:08 -08:00
John MacFarlane
9f28acba9d
Fixed highlighting for inline code.
...
highlightHtml in Highlighting now has a boolean argument that
selects between inline and block content.
Revised tests for new highlighting-kate.
2011-01-29 16:04:07 -08:00
John MacFarlane
570d8ff08c
Moved tests to src.
2011-01-29 11:24:16 -08:00
John MacFarlane
0833daff4a
Added Tests.Shared with normalize round-trip tests.
2011-01-29 10:03:24 -08:00
John MacFarlane
18089a44f5
Tests.Arbitrary: don't allow empty list items.
2011-01-29 10:02:12 -08:00
John MacFarlane
e9899b9ab8
Removed intentionally failing test in ConTeXt writer tests.
2011-01-29 09:04:05 -08:00
John MacFarlane
d8c9b0c6f7
Added biblatex citation tests to Tests.Readers.LaTeX.
...
Removed old biblatex-citations.latex.
2011-01-29 09:01:30 -08:00
John MacFarlane
7961208aaf
Added natbib citation tests to Tests.Readers.LaTeX.
...
Removed old tests/natbib-citations.latex.
2011-01-29 08:47:00 -08:00
John MacFarlane
382564ed9e
RTF writer: Embed images when possible.
...
* Resolves Issue #275 .
* PNG and JPEG supported.
* Export rtfEmbedImage.
2011-01-28 08:42:04 -08:00
John MacFarlane
0acf774011
Added Tests.Readers.Markdown.
2011-01-26 22:09:09 -08:00
John MacFarlane
f8dca6ccbc
Add support for attributes in inline Code.
...
Additional related changes:
* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
essential for inline code.
2011-01-26 20:44:25 -08:00
John MacFarlane
703c421c9e
RST reader: Improved field lists.
...
Field lists now work properly with block content.
(Thanks to Lachlan Musicman for pointing out the bug.)
In addition, definition list items are now always Para instead
of Plain -- which matches behavior of rst2xml.py.
Finally, in image blocks, the alt attribute is parsed properly
and used for the alt, not also the title.
2011-01-26 17:23:57 -08:00
John MacFarlane
066cbbad76
Added RST reader tests.
2011-01-26 17:23:56 -08:00
John MacFarlane
c5384a33c0
Updates for compiling with ghc 7.
...
We now use a CPP trick to have compatible quasiquotes that
work in both GHC 6.12 and 7.
2011-01-26 17:23:56 -08:00
John MacFarlane
932fc12840
Updated tests.
2011-01-26 17:23:56 -08:00
John MacFarlane
eb26fa6f54
Distinguish latex & context environments; blank line after in writers.
2011-01-26 17:23:56 -08:00
John MacFarlane
bd43c0f4c9
Bumped version to 1.8; depend on pandoc-types 1.8.
...
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.
All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane
5bee388914
Updated textile tests.
2011-01-23 10:18:53 -08:00
John MacFarlane
65a015e74b
Added needed space after .bc and .bq.
...
Otherwise these can trap a </dd>, for example.
Better solution to try next: rewrite using Pretty.
2011-01-23 10:08:11 -08:00
John MacFarlane
16d4366431
Textile writer: Don't escape code in bc. block.
2011-01-23 09:44:28 -08:00
John MacFarlane
38013de857
Textile writer: Don't HTML-escape between @'s.
2011-01-23 09:12:50 -08:00
John MacFarlane
628a1ef815
Textile reader: Fixed bug (swallowed p at beginning of paragraph).
...
The problem was a missing 'try' in the maybeExplicitBlock parser.
Test case, a paragraph beginning with 'p', has been added.
2011-01-23 08:59:35 -08:00
John MacFarlane
7234a79104
Textile writer: Use <pre> instead of bc.. for code with blank lines.
...
This has fewer interaction effects.
2011-01-23 08:49:55 -08:00
John MacFarlane
1d683be414
Textile reader: Support <tt> for inline code.
2011-01-23 00:25:05 -08:00
John MacFarlane
50d08ec2c3
Textile reader: Added code blocks with bc.
2011-01-23 00:05:35 -08:00
John MacFarlane
b9356fcc7e
Removed deliberate error in LaTeX reader tests.
2011-01-22 16:01:14 -08:00
John MacFarlane
2bea4e3729
Reorganized tests.
...
The native writer test needs to run before others that depend on it.
2011-01-22 15:54:24 -08:00
John MacFarlane
87aaa7e719
Use ANSI color to point to diffs in test output.
...
ConTeXt writer bullet list test set to break as an example.
2011-01-22 14:58:32 -08:00
John MacFarlane
91cc03b131
Tests.Helpers: Added file quasiquoter.
...
This allows you to take expected test output from a file.
2011-01-22 13:54:12 -08:00
John MacFarlane
1fd5e3bcff
Tests.Arbitrary: Let strings include any character.
2011-01-22 13:40:29 -08:00
John MacFarlane
5a1abbe7ac
Fixed -Wall error in imports.
2011-01-22 13:40:18 -08:00
John MacFarlane
c801f4f621
Put dashed lines around diff results in Old test.
2011-01-22 13:39:59 -08:00
John MacFarlane
373d05601a
Added native writer tests.
2011-01-22 12:37:19 -08:00
John MacFarlane
209b300d6a
Added 'property' in Tests.Helpers & some quickcheck tests.
2011-01-22 12:18:59 -08:00
John MacFarlane
d86d9260df
Tests.Arbitrary: Added instances for Inlines, Blocks.
2011-01-22 12:18:23 -08:00
John MacFarlane
8dcc67a993
ConTeXt writer: Don't add cr at end of inline footnote.
2011-01-22 12:17:39 -08:00
John MacFarlane
15250859c3
Improved test framework.
...
Now there is a uniform interface for reader and writer tests.
Also added a quasiquoter, for multiline strings.
2011-01-22 10:50:15 -08:00
John MacFarlane
b3c1a89cdf
Merge branch 'master' of github.com:jgm/pandoc
2011-01-21 19:55:24 -08:00
John MacFarlane
654c39a7d2
latex template: move special treatment of \sout.
...
It needs to be inside the if(strikeout) condition, after
the ulem package is imported; otherwise we try to renewcommand{\sout} when
\sout isn't yet defined.
2011-01-21 19:24:00 -08:00
John MacFarlane
d43dbc83f2
More informative output on writer test failure.
2011-01-21 11:02:59 -08:00
John MacFarlane
d0726920db
Added Tests.Writers.ConTeXt and helpers for writer tests.
2011-01-21 10:23:41 -08:00
John MacFarlane
5c35be1362
Make sure native output ends in newline with --standalone.
2011-01-21 09:58:23 -08:00
John MacFarlane
e5e2b0f9ab
Fixed the two test cases that were intentionally set to fail.
2011-01-20 22:38:16 -08:00
John MacFarlane
52b6e38425
Updated tests for new native format.
2011-01-20 22:36:40 -08:00
John MacFarlane
9a739e30bf
Fixed problem with strikout in LaTeX headers with hyperref.
...
Added a command to the latex template to disable \sout inside
pdf strings. Thanks to Joost Kremers for the fix.
2011-01-19 11:43:30 -08:00
John MacFarlane
933cdaf4c8
Show Haskell-readable version of input string in test failure.
2011-01-19 09:44:53 -08:00
John MacFarlane
831889bebc
Unit tests: On failure, print the input string.
2011-01-19 09:38:14 -08:00
John MacFarlane
608d5bc753
Added normalize in latex reader tests.
2011-01-18 23:37:54 -08:00
John MacFarlane
0502c0fd28
Revamped tests with new =: and =?> operators + builder.
...
Left in a couple failing tests for demonstration purposes.
2011-01-18 23:34:34 -08:00
John MacFarlane
0cfafdec64
Replaced --no-citeproc with --natbib in tests.
2011-01-16 11:19:52 -08:00
John MacFarlane
a0e19ba8aa
Merge branch 'tests'
2011-01-15 09:25:01 -08:00
John MacFarlane
18231a8232
Fixed lhs tests for new position of <title> after <meta>s.
2011-01-15 08:22:41 -08:00
John MacFarlane
9305114b9f
LaTeX writer: Escape strings in \href{..}.
...
Previously strings weren't escaped, so %5D would be interpreted
as a LaTeX comment!
2011-01-14 18:59:50 -08:00
John MacFarlane
dc93073804
Minor code cleanup.
2011-01-14 18:09:16 -08:00
John MacFarlane
0222f367b1
Keep Tests.Arbitrary but remove quickcheck tests for now.
...
Remove Tests.Shared.
Remove dependency on QuickCheck.
2011-01-14 18:01:57 -08:00
John MacFarlane
09e9a86db9
Merge branch 'master' of github.com:jgm/pandoc into tests
2011-01-14 14:46:48 -08:00
John MacFarlane
81403b8d80
LateX writer: In nonsimple tables, put cells in \parbox.
...
Otherwise we can get problems with linebreaks, and cell spacing
isn't right.
Thanks to Jef Allbright for pointing out the problem.
2011-01-14 14:45:04 -08:00
John MacFarlane
d41c17a2d5
Added quickcheck tests for normalize in Shared.
2011-01-14 00:30:36 -08:00
John MacFarlane
b3fb541d01
Added Tests/Arbitrary.hs, with Arbitrary instances.
2011-01-13 22:31:04 -08:00
John MacFarlane
10747b7797
Fixed bug in markdown-citations.mhra.txt expected test output.
...
This failing test was a test suite bug, not a pandoc or citeproc bug.
2011-01-13 14:50:00 -08:00
John MacFarlane
75e8ab25ef
Adjusted source to 80-column limit.
2011-01-13 11:11:55 -08:00
John MacFarlane
4ccd30fe3e
Moved Tests.Shared -> Tests.Helpers.
...
Tests.Shared would be the natural place to put tests for functions
in Text.Pandoc.Shared.
2011-01-13 10:59:44 -08:00
John MacFarlane
99c361d2b4
Fixed bug in markdown-citations.mhra.txt expected test output.
...
This failing test was a test suite bug, not a pandoc or citeproc bug.
2011-01-13 10:58:58 -08:00
Nathan Gass
2dadb67b25
Generalized latexTestWithState to readerTestWithState.
2011-01-12 19:32:26 +01:00
Nathan Gass
daf5444e24
Merge branch 'tests' of github.com:xabbu42/pandoc into tests
2011-01-12 19:13:15 +01:00
Nathan Gass
e61348dc11
Reordered test files.
2011-01-12 19:12:54 +01:00
John MacFarlane
e9f1de639d
test diff output: put +/- at beginning of line.
2011-01-12 09:59:06 -08:00
John MacFarlane
3ebfcd0cea
Added line numbers to diff output in tests.
2011-01-12 08:29:13 -08:00
John MacFarlane
a2f562719d
Updated lhs tests for new positioning of <title>.
2011-01-12 08:17:38 -08:00
John MacFarlane
5da2d1e66c
Merge branch 'master' into tests
2011-01-12 08:13:11 -08:00
Nathan Gass
ff74c51b53
Remove some accidentally commited functions. Fixed a type and alignment.
2011-01-12 14:44:32 +01:00
Nathan Gass
ec4deb2532
Added some basic testing infrastructure and some latex reader tests.
2011-01-12 14:16:35 +01:00
Nathan Gass
4f6099f350
Started implementing splitted test suite.
...
Moved old tests into Old.hs and added new simple test-pandoc.hs for
loading and grouping together tests from different files. Later
commits will add more testfiles to the suite with more modular tests.
2011-01-12 13:11:08 +01:00
John MacFarlane
cf5e8a824f
test-pandoc: Improved header for diff output.
2011-01-12 11:36:02 +01:00
John MacFarlane
530e3edc0f
test-pandoc: More informative diff output on test failure.
...
Now the test suite tells you the exact command that was run,
and the file containing the expected output.
2011-01-12 11:35:49 +01:00
John MacFarlane
046c9c7d3b
test-pandoc: Relocated --columns=80 to just where it's needed.
...
We only need it for certain table tests, because of the relative
alignments.
2011-01-12 11:35:44 +01:00
John MacFarlane
51d9d8b674
test-pandoc: Fixed + and - in diff output, which were reversed.
2011-01-12 11:35:40 +01:00
John MacFarlane
715e33705f
test-pandoc: More diff-like diffs in case of test failure.
2011-01-12 11:35:34 +01:00
John MacFarlane
eb1d014859
Improvements to test suite.
...
+ You can now specify glob patterns after 'cabal test';
e.g. 'cabal test latex' will only run the latex tests.
+ Instead of detecting highlighting support in Setup.hs,
we now detect it in test-pandoc, by looking to see if
'languages' is null.
+ We now verify the lhs readers against the lhs-test.native,
normalizing with 'normalize'. This makes more sense than
verifying against HTML, which also brings in the HTML writer.
+ Added lhsn-test.nohl.{html,html+lhs}, so we can do the lhs
tests whether or not highlighting has been installed.
2011-01-12 11:35:10 +01:00
John MacFarlane
91510a109f
Improvements to --html5 support:
...
+ <nav> for TOC, <figure> for figures, type attribute in <ol>.
+ Don't add math javascript in html5.
+ Use style attributes instead of deprecated width, align.
+ html template: move <title> after <meta>.
Note: charset needs to be declared before title.
+ slidy and s5 templates: move <title> after <meta>.
+ html template: Added link to html5 shim for IE.
+ Make --html5 have an effect only for 'html' writer (not s5, slidy, epub).
2011-01-11 23:15:30 -08:00
Nathan Gass
3bc0a55af0
Removed outdated comments.
2011-01-11 22:37:41 +01:00
Nathan Gass
e8fa72c6a7
Moved test-pandoc.hs to tests directory.
2011-01-11 21:49:49 +01:00
John MacFarlane
d891b2c29d
LaTeX reader: Support simple tables.
2011-01-07 10:15:48 -08:00
John MacFarlane
93c3e27731
pandoc: Add newline to output unless standalone.
...
This avoids output that does not end with a newline, which
is inconvenient when working with many tools.
Updated tests accordingly.
2011-01-06 21:05:28 -08:00
John MacFarlane
71bedab81c
LHS test changes for new wrapping & highlighting-kate version.
2011-01-06 21:04:57 -08:00
John MacFarlane
9ff560036e
Fixed lhs-test.markdown for new wrapping.
2011-01-06 16:53:44 -08:00
John MacFarlane
303ce8a9e5
LaTeX reader: allow spaces btw \\begin or \\end and {.
2011-01-06 09:34:24 -08:00
John MacFarlane
3e61333af0
Fixed regression in markdown reader.
...
'(_hi_)' was being parsed with literal underscores (no emphasis).
The fix: the 'str' parser now only parses alphanumerics and
embedded underscores. All other symbols are handled by the
'symbol' parser. This has a slight effect on the AST, since
you'll get [Str "hi",Str ":"] insntead of [Str "hi:"]. But there
should not be a visible effect in any of the writers.
Thanks to gwern for pointing out the regression.
2011-01-01 22:46:30 -08:00
John MacFarlane
904050fa36
New HTML reader using tagsoup as a lexer.
...
* The new reader is faster and more accurate.
* API changes for Text.Pandoc.Readers.HTML:
- removed rawHtmlBlock, anyHtmlBlockTag, anyHtmlInlineTag,
anyHtmlTag, anyHtmlEndTag, htmlEndTag, extractTagType,
htmlBlockElement, htmlComment
- added htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag
* tagsoup is a new dependency.
* Text.Pandoc.Parsing: Generalized type on readWith.
* Benchmark.hs: Added length calculation to force full evaluation.
* Updated HTML reader tests.
* Updated markdown and textile readers to use the functions from
the HTML reader.
* Note: The markdown reader now correctly handles some cases it did not
before. For example:
<hr/>
is reproduced without adding a space.
<script>
a = '<b>';
</script>
is parsed correctly.
2010-12-30 13:55:40 -08:00
John MacFarlane
4bfe140ed1
Made --smart work with HTML reader.
...
It did not work before, because - and quotes were gobbled
up by the str parser.
2010-12-22 17:05:17 -08:00
John MacFarlane
8e9c490b0a
Texinfo writer: Updated to use Pretty.
2010-12-22 11:43:43 -08:00
John MacFarlane
fd07db16e9
Man writer: updated to use Pretty.
2010-12-22 00:22:13 -08:00
John MacFarlane
c904024944
OpenDocument writer: Updated to use Pretty.
2010-12-21 16:59:17 -08:00
John MacFarlane
ebdbb06f94
Docbook writer: Updated to use Pretty.
2010-12-21 16:45:43 -08:00
John MacFarlane
78cea94f45
Markdown writer: use \ for newline instead of two spaces at eol.
...
(Unless --strict.)
2010-12-20 19:36:40 -08:00
John MacFarlane
2587543457
ConTeXt writer: Updated to use Text.Pandoc.Pretty.
2010-12-20 19:36:35 -08:00
John MacFarlane
71bc3789a3
Fixed markdown-citations.ieee.txt.
2010-12-19 12:43:25 -08:00
John MacFarlane
9fd45aaa2d
Fixed markdown-citations.txt.
2010-12-19 12:42:32 -08:00
John MacFarlane
9210b7ef69
Fixed biblatex/natbib citation writer tests.
2010-12-19 12:41:27 -08:00
John MacFarlane
99a58e51f5
LaTeX writer: Modified to use Pretty.
...
Improved footnote formatting, removed spurious blank lines.
2010-12-19 10:14:12 -08:00