diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2017-02-20 20:52:00 +0100 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2017-02-20 20:52:00 +0100 |
| commit | ce8226f1a7d64da56117d2f7f351e06225a84614 (patch) | |
| tree | 9f2d716df0230f5f17372f19b8718dcf86039fd9 /test/Tests/Shared.hs | |
| parent | e86e44b98e592d5a5e4c6b43d9b57b195f091ed9 (diff) | |
| parent | 12d96508c62189b4ff8c8b797d34cc9ef177f5ee (diff) | |
| download | pandoc-ce8226f1a7d64da56117d2f7f351e06225a84614.tar.gz | |
Merge commit '9e52ac6bb02afd7b4ed5dad61021a1fa33051203' as 'data/templates'
Diffstat (limited to 'test/Tests/Shared.hs')
| -rw-r--r-- | test/Tests/Shared.hs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/test/Tests/Shared.hs b/test/Tests/Shared.hs deleted file mode 100644 index 9b9aeb6a3..000000000 --- a/test/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"]))] |
