aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-16 08:30:44 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:43 +0100
commit2bc0cbc2390201e25ada4be2b936d7165ba650e3 (patch)
tree0c7a394712c598adf942d3d76bc61a576bb47736 /tests
parente02e3aa10c02db526432d12d6672094d8d942d74 (diff)
downloadpandoc-2bc0cbc2390201e25ada4be2b936d7165ba650e3.tar.gz
Removed tests for Walk; these now live in pandoc-types.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Walk.hs46
-rw-r--r--tests/test-pandoc.hs2
2 files changed, 0 insertions, 48 deletions
diff --git a/tests/Tests/Walk.hs b/tests/Tests/Walk.hs
deleted file mode 100644
index 876d75e30..000000000
--- a/tests/Tests/Walk.hs
+++ /dev/null
@@ -1,46 +0,0 @@
-{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
-module Tests.Walk (tests) where
-
-import Text.Pandoc.Definition
-import Text.Pandoc.Walk
-import Test.Framework
-import Tests.Helpers
-import Data.Char (toUpper)
-import Text.Pandoc.Arbitrary()
-import Data.Generics
-
-tests :: [Test]
-tests = [ testGroup "Walk"
- [ property "p_walk inlineTrans" (p_walk inlineTrans)
- , property "p_walk blockTrans" (p_walk blockTrans)
- , property "p_query inlineQuery" (p_query inlineQuery)
- , property "p_query blockQuery" (p_query blockQuery)
- ]
- ]
-
-p_walk :: (Typeable a, Walkable a Pandoc)
- => (a -> a) -> Pandoc -> Bool
-p_walk f d = everywhere (mkT f) d == walk f d
-
-p_query :: (Eq a, Typeable a1, Monoid a, Walkable a1 Pandoc)
- => (a1 -> a) -> Pandoc -> Bool
-p_query f d = everything mappend (mempty `mkQ` f) d == query f d
-
-inlineTrans :: Inline -> Inline
-inlineTrans (Str xs) = Str $ map toUpper xs
-inlineTrans (Emph xs) = Strong xs
-inlineTrans x = x
-
-blockTrans :: Block -> Block
-blockTrans (Plain xs) = Para xs
-blockTrans (BlockQuote xs) = Div ("",["special"],[]) xs
-blockTrans x = x
-
-inlineQuery :: Inline -> String
-inlineQuery (Str xs) = xs
-inlineQuery _ = ""
-
-blockQuery :: Block -> [Int]
-blockQuery (Header lev _ _) = [lev]
-blockQuery _ = []
-
diff --git a/tests/test-pandoc.hs b/tests/test-pandoc.hs
index 2488917cb..7d0542bf4 100644
--- a/tests/test-pandoc.hs
+++ b/tests/test-pandoc.hs
@@ -26,14 +26,12 @@ import qualified Tests.Writers.Docx
import qualified Tests.Writers.RST
import qualified Tests.Writers.TEI
import qualified Tests.Shared
-import qualified Tests.Walk
import Text.Pandoc.Shared (inDirectory)
import System.Environment (getArgs)
tests :: [Test]
tests = [ testGroup "Old" Tests.Old.tests
, testGroup "Shared" Tests.Shared.tests
- , testGroup "Walk" Tests.Walk.tests
, testGroup "Writers"
[ testGroup "Native" Tests.Writers.Native.tests
, testGroup "ConTeXt" Tests.Writers.ConTeXt.tests