summaryrefslogtreecommitdiff
path: root/tests/Tests/Shared.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-04 12:56:30 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-04 12:56:30 +0100
commit18ab8642692caca2716fd9b5a0e6dbfd3d9cf9cc (patch)
tree05f4e9024093e233c131b3494e71265062ffd94a /tests/Tests/Shared.hs
parent8418c1a7d7e5312dfddbc011adb257552b2a864b (diff)
Moved tests/ -> test/.
Diffstat (limited to 'tests/Tests/Shared.hs')
-rw-r--r--tests/Tests/Shared.hs40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs
deleted file mode 100644
index 9b9aeb6a3..000000000
--- a/tests/Tests/Shared.hs
+++ /dev/null
@@ -1,40 +0,0 @@
-module Tests.Shared (tests) where
-
-import Text.Pandoc.Shared
-import Test.Framework
-import Text.Pandoc.Arbitrary()
-import Test.Framework.Providers.HUnit
-import Test.HUnit ( assertBool, (@?=) )
-import Text.Pandoc.Builder
-import System.FilePath.Posix (joinPath)
-
-tests :: [Test]
-tests = [ testGroup "compactifyDL"
- [ testCase "compactifyDL with empty def" $
- assertBool "compactifyDL"
- (let x = [(str "word", [para (str "def"), mempty])]
- in compactifyDL x == x)
- ]
- , testGroup "collapseFilePath" testCollapse
- ]
-
-testCollapse :: [Test]
-testCollapse = map (testCase "collapse")
- [ (collapseFilePath (joinPath [ ""]) @?= (joinPath [ ""]))
- , (collapseFilePath (joinPath [ ".","foo"]) @?= (joinPath [ "foo"]))
- , (collapseFilePath (joinPath [ ".",".","..","foo"]) @?= (joinPath [ joinPath ["..", "foo"]]))
- , (collapseFilePath (joinPath [ "..","foo"]) @?= (joinPath [ "..","foo"]))
- , (collapseFilePath (joinPath [ "","bar","..","baz"]) @?= (joinPath [ "","baz"]))
- , (collapseFilePath (joinPath [ "","..","baz"]) @?= (joinPath [ "","..","baz"]))
- , (collapseFilePath (joinPath [ ".","foo","..",".","bar","..",".",".","baz"]) @?= (joinPath [ "baz"]))
- , (collapseFilePath (joinPath [ ".",""]) @?= (joinPath [ ""]))
- , (collapseFilePath (joinPath [ ".",".",""]) @?= (joinPath [ ""]))
- , (collapseFilePath (joinPath [ "..",""]) @?= (joinPath [ ".."]))
- , (collapseFilePath (joinPath [ "..",".",""]) @?= (joinPath [ ".."]))
- , (collapseFilePath (joinPath [ ".","..",""]) @?= (joinPath [ ".."]))
- , (collapseFilePath (joinPath [ "..","..",""]) @?= (joinPath [ "..",".."]))
- , (collapseFilePath (joinPath [ "parent","foo","baz","..","bar"]) @?= (joinPath [ "parent","foo","bar"]))
- , (collapseFilePath (joinPath [ "parent","foo","baz","..","..","bar"]) @?= (joinPath [ "parent","bar"]))
- , (collapseFilePath (joinPath [ "parent","foo",".."]) @?= (joinPath [ "parent"]))
- , (collapseFilePath (joinPath [ "","parent","foo","..","..","bar"]) @?= (joinPath [ "","bar"]))
- , (collapseFilePath (joinPath [ "",".","parent","foo"]) @?= (joinPath [ "","parent","foo"]))]