diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-22 12:28:30 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-22 12:37:19 -0800 |
commit | 373d05601a37caa6ea84c1ec46d3ef5c3c28a75f (patch) | |
tree | 0f66fcab854d4d1e71dc566ed82cc5acc914f2ef /tests/Tests/Writers | |
parent | 209b300d6adeb2427c0058b808945ac39f851b24 (diff) | |
download | pandoc-373d05601a37caa6ea84c1ec46d3ef5c3c28a75f.tar.gz |
Added native writer tests.
Diffstat (limited to 'tests/Tests/Writers')
-rw-r--r-- | tests/Tests/Writers/Native.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Tests/Writers/Native.hs b/tests/Tests/Writers/Native.hs new file mode 100644 index 000000000..234fe938a --- /dev/null +++ b/tests/Tests/Writers/Native.hs @@ -0,0 +1,20 @@ +module Tests.Writers.Native (tests) where + +import Test.Framework +import Text.Pandoc.Builder +import Text.Pandoc +import Tests.Helpers +import Tests.Arbitrary() + +p_write_rt :: Pandoc -> Bool +p_write_rt d = + read (writeNative defaultWriterOptions{ writerStandalone = True } d) == d + +p_write_blocks_rt :: [Block] -> Bool +p_write_blocks_rt bs = + read (writeNative defaultWriterOptions (Pandoc (Meta [] [] []) bs)) == bs + +tests :: [Test] +tests = [ property "p_write_rt" p_write_rt + , property "p_write_blocks_rt" p_write_blocks_rt + ] |