From 18ab8642692caca2716fd9b5a0e6dbfd3d9cf9cc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 Feb 2017 12:56:30 +0100 Subject: Moved tests/ -> test/. --- test/Tests/Writers/Native.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/Tests/Writers/Native.hs (limited to 'test/Tests/Writers/Native.hs') diff --git a/test/Tests/Writers/Native.hs b/test/Tests/Writers/Native.hs new file mode 100644 index 000000000..88bad7944 --- /dev/null +++ b/test/Tests/Writers/Native.hs @@ -0,0 +1,21 @@ +module Tests.Writers.Native (tests) where + +import Test.Framework +import Text.Pandoc.Builder +import Text.Pandoc +import Tests.Helpers +import Text.Pandoc.Arbitrary() + +p_write_rt :: Pandoc -> Bool +p_write_rt d = + read (purely (writeNative def{ writerTemplate = Just "" }) d) == d + +p_write_blocks_rt :: [Block] -> Bool +p_write_blocks_rt bs = length bs > 20 || + read (purely (writeNative def) (Pandoc nullMeta 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