From 570d8ff08c7007c4fffd345c9bf2057201a0bdd4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 29 Jan 2011 11:24:16 -0800 Subject: Moved tests to src. --- src/Tests/Writers/Native.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Tests/Writers/Native.hs (limited to 'src/Tests/Writers/Native.hs') diff --git a/src/Tests/Writers/Native.hs b/src/Tests/Writers/Native.hs new file mode 100644 index 000000000..234fe938a --- /dev/null +++ b/src/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 + ] -- cgit v1.2.3