diff options
Diffstat (limited to 'tests')
65 files changed, 235 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Odt.hs b/tests/Tests/Readers/Odt.hs new file mode 100644 index 000000000..cf30b8398 --- /dev/null +++ b/tests/Tests/Readers/Odt.hs @@ -0,0 +1,165 @@ +module Tests.Readers.Odt (tests) where + +import Control.Monad ( liftM ) +import Text.Pandoc.Options +import Text.Pandoc.Readers.Native +import Text.Pandoc.Readers.Markdown +import Text.Pandoc.Definition +import Text.Pandoc.Error +import Tests.Helpers +import Test.Framework +--import Test.HUnit (assertBool) +--import Test.Framework.Providers.HUnit +import qualified Data.ByteString.Lazy as B +import Text.Pandoc.Readers.Odt +import Text.Pandoc.Writers.Native (writeNative) +import qualified Data.Map as M +--import Text.Pandoc.MediaBag (MediaBag, lookupMedia, mediaDirectory) +--import Codec.Archive.Zip + + +tests :: [Test] +tests = testsComparingToMarkdown ++ testsComparingToNative + +testsComparingToMarkdown :: [Test] +testsComparingToMarkdown = map nameToTest namesOfTestsComparingToMarkdown + where nameToTest name = createTest + compareOdtToMarkdown + name + (toOdtPath name) + (toMarkdownPath name) + toOdtPath name = "odt/odt/" ++ name ++ ".odt" + toMarkdownPath name = "odt/markdown/" ++ name ++ ".md" + +testsComparingToNative :: [Test] +testsComparingToNative = map nameToTest namesOfTestsComparingToNative + where nameToTest name = createTest + compareOdtToNative + name + (toOdtPath name) + (toNativePath name) + toOdtPath name = "odt/odt/" ++ name ++ ".odt" + toNativePath name = "odt/native/" ++ name ++ ".native" + + +newtype NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc} + deriving ( Show ) + +instance ToString NoNormPandoc where + toString d = writeNative def{ writerStandalone = s } $ toPandoc d + where s = case d of + NoNormPandoc (Pandoc (Meta m) _) + | M.null m -> False + | otherwise -> True + +instance ToPandoc NoNormPandoc where + toPandoc = unNoNorm + +getNoNormVia :: (a -> Pandoc) -> String -> Either PandocError a -> NoNormPandoc +getNoNormVia _ readerName (Left _) = error (readerName ++ " reader failed") +getNoNormVia f _ (Right a) = NoNormPandoc (f a) + +type TestCreator = ReaderOptions + -> FilePath -> FilePath + -> IO (NoNormPandoc, NoNormPandoc) + +compareOdtToNative :: TestCreator +compareOdtToNative opts odtPath nativePath = do + nativeFile <- Prelude.readFile nativePath + odtFile <- B.readFile odtPath + let native = getNoNormVia id "native" $ readNative nativeFile + let odt = getNoNormVia fst "odt" $ readOdt opts odtFile + return (odt,native) + +compareOdtToMarkdown :: TestCreator +compareOdtToMarkdown opts odtPath markdownPath = do + markdownFile <- Prelude.readFile markdownPath + odtFile <- B.readFile odtPath + let markdown = getNoNormVia id "markdown" $ readMarkdown opts markdownFile + let odt = getNoNormVia fst "odt" $ readOdt opts odtFile + return (odt,markdown) + + +createTest :: TestCreator + -> TestName + -> FilePath -> FilePath + -> Test +createTest creator name path1 path2 = + buildTest $ liftM (test id name) (creator def path1 path2) + +{- +-- + +getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString) +getMedia archivePath mediaPath = do + zf <- B.readFile archivePath >>= return . toArchive + return $ findEntryByPath ("Pictures/" ++ mediaPath) zf >>= (Just . fromEntry) + +compareMediaPathIO :: FilePath -> MediaBag -> FilePath -> IO Bool +compareMediaPathIO mediaPath mediaBag odtPath = do + odtMedia <- getMedia odtPath mediaPath + let mbBS = case lookupMedia mediaPath mediaBag of + Just (_, bs) -> bs + Nothing -> error ("couldn't find " ++ + mediaPath ++ + " in media bag") + odtBS = case odtMedia of + Just bs -> bs + Nothing -> error ("couldn't find " ++ + mediaPath ++ + " in media bag") + return $ mbBS == odtBS + +compareMediaBagIO :: FilePath -> IO Bool +compareMediaBagIO odtFile = do + df <- B.readFile odtFile + let (_, mb) = readOdt def df + bools <- mapM + (\(fp, _, _) -> compareMediaPathIO fp mb odtFile) + (mediaDirectory mb) + return $ and bools + +testMediaBagIO :: String -> FilePath -> IO Test +testMediaBagIO name odtFile = do + outcome <- compareMediaBagIO odtFile + return $ testCase name (assertBool + ("Media didn't match media bag in file " ++ odtFile) + outcome) + +testMediaBag :: String -> FilePath -> Test +testMediaBag name odtFile = buildTest $ testMediaBagIO name odtFile +-} +-- + + + +namesOfTestsComparingToMarkdown :: [ String ] +namesOfTestsComparingToMarkdown = [ "bold" +-- , "citation" + , "endnote" + , "externalLink" + , "footnote" + , "headers" +-- , "horizontalRule" +-- , "image" + , "italic" +-- , "listBlocks" + , "paragraph" + , "strikeout" +-- , "trackedChanges" + , "underlined" + ] + +namesOfTestsComparingToNative :: [ String ] +namesOfTestsComparingToNative = [ "blockquote" + , "orderedListMixed" + , "orderedListRoman" + , "orderedListSimple" + , "referenceToChapter" + , "referenceToListItem" + , "referenceToText" + , "simpleTable" +-- , "table" + , "unicode" + , "unorderedList" + ]
\ No newline at end of file diff --git a/tests/odt/markdown/bold.md b/tests/odt/markdown/bold.md new file mode 100644 index 000000000..fa4eb0431 --- /dev/null +++ b/tests/odt/markdown/bold.md @@ -0,0 +1 @@ +Here comes **bold** text
\ No newline at end of file diff --git a/tests/odt/markdown/citation.md b/tests/odt/markdown/citation.md new file mode 100644 index 000000000..adcc9f0ff --- /dev/null +++ b/tests/odt/markdown/citation.md @@ -0,0 +1 @@ +Some text[@Ex] with a citation.
\ No newline at end of file diff --git a/tests/odt/markdown/endnote.md b/tests/odt/markdown/endnote.md new file mode 100644 index 000000000..679af3fdc --- /dev/null +++ b/tests/odt/markdown/endnote.md @@ -0,0 +1,3 @@ +Some text[^1] with an endnote. + +[^1]: Endnote text
\ No newline at end of file diff --git a/tests/odt/markdown/externalLink.md b/tests/odt/markdown/externalLink.md new file mode 100644 index 000000000..14f48d0f5 --- /dev/null +++ b/tests/odt/markdown/externalLink.md @@ -0,0 +1 @@ +Here comes an [external link](http://example.com/) to example.com.
\ No newline at end of file diff --git a/tests/odt/markdown/footnote.md b/tests/odt/markdown/footnote.md new file mode 100644 index 000000000..973ae2d3a --- /dev/null +++ b/tests/odt/markdown/footnote.md @@ -0,0 +1,3 @@ +Some text[^1] with a footnote. + +[^1]: Footnote text
\ No newline at end of file diff --git a/tests/odt/markdown/headers.md b/tests/odt/markdown/headers.md new file mode 100644 index 000000000..ea5d4452c --- /dev/null +++ b/tests/odt/markdown/headers.md @@ -0,0 +1,9 @@ +# A header (Lv 1) + +A paragraph + +## Another header (Lv 2) + +Another paragraph + +# Back to Level 1
\ No newline at end of file diff --git a/tests/odt/markdown/horizontalRule.md b/tests/odt/markdown/horizontalRule.md new file mode 100644 index 000000000..73b314ff7 --- /dev/null +++ b/tests/odt/markdown/horizontalRule.md @@ -0,0 +1 @@ +---
\ No newline at end of file diff --git a/tests/odt/markdown/image.md b/tests/odt/markdown/image.md new file mode 100644 index 000000000..3862d709e --- /dev/null +++ b/tests/odt/markdown/image.md @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/tests/odt/markdown/imageIndex.md b/tests/odt/markdown/imageIndex.md new file mode 100644 index 000000000..6719ab8a8 --- /dev/null +++ b/tests/odt/markdown/imageIndex.md @@ -0,0 +1,6 @@ +# Abbildungsverzeichnis + +Abbildung 1: Image caption + + + diff --git a/tests/odt/markdown/imageWithCaption.md b/tests/odt/markdown/imageWithCaption.md new file mode 100644 index 000000000..0046ae141 --- /dev/null +++ b/tests/odt/markdown/imageWithCaption.md @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/tests/odt/markdown/italic.md b/tests/odt/markdown/italic.md new file mode 100644 index 000000000..b4d2f3d40 --- /dev/null +++ b/tests/odt/markdown/italic.md @@ -0,0 +1 @@ +Here comes *italic* text
\ No newline at end of file diff --git a/tests/odt/markdown/listBlocks.md b/tests/odt/markdown/listBlocks.md new file mode 100644 index 000000000..22c77bb2b --- /dev/null +++ b/tests/odt/markdown/listBlocks.md @@ -0,0 +1,6 @@ +<text:list xml:id="list2666723676250588421" text:style-name="L6"> +<text:list-header> +<text:p text:style-name="P1">Indented text in a list.</text:p> +</text:list-header> +<text:list-item> +<text:p text:style-name="P1">This is a numbered block.<text:line-break/>It contains several paragraphs of text.<text:line-break/>Like this.</text:p></text:list-item><text:list-item><text:p text:style-name="P1">Next item.</text:p></text:list-item></text:list></office:text></office:body></office:document-content>
\ No newline at end of file diff --git a/tests/odt/markdown/paragraph.md b/tests/odt/markdown/paragraph.md new file mode 100644 index 000000000..0a822e322 --- /dev/null +++ b/tests/odt/markdown/paragraph.md @@ -0,0 +1,5 @@ +This is a paragraph. + +This is another paragraph. + +This is a third one.
\ No newline at end of file diff --git a/tests/odt/markdown/strikeout.md b/tests/odt/markdown/strikeout.md new file mode 100644 index 000000000..6ae4571dd --- /dev/null +++ b/tests/odt/markdown/strikeout.md @@ -0,0 +1 @@ +Here comes text that was ~~striken out~~.
\ No newline at end of file diff --git a/tests/odt/markdown/trackedChanges.md b/tests/odt/markdown/trackedChanges.md new file mode 100644 index 000000000..f0bd478a3 --- /dev/null +++ b/tests/odt/markdown/trackedChanges.md @@ -0,0 +1 @@ +Some text with and inserted text.
\ No newline at end of file diff --git a/tests/odt/markdown/underlined.md b/tests/odt/markdown/underlined.md new file mode 100644 index 000000000..05fb92379 --- /dev/null +++ b/tests/odt/markdown/underlined.md @@ -0,0 +1 @@ +Here comes *underlined* text
\ No newline at end of file diff --git a/tests/odt/native/blockquote.native b/tests/odt/native/blockquote.native new file mode 100644 index 000000000..8c9409dde --- /dev/null +++ b/tests/odt/native/blockquote.native @@ -0,0 +1 @@ +[Para [Str "Normal"],BlockQuote [Para [Str "Indented",Space,Str "(1cm)"]]]
\ No newline at end of file diff --git a/tests/odt/native/orderedListMixed.native b/tests/odt/native/orderedListMixed.native new file mode 100644 index 000000000..a50f5e2ad --- /dev/null +++ b/tests/odt/native/orderedListMixed.native @@ -0,0 +1 @@ +Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,Decimal,Period) [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,Decimal,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,LowerAlpha,OneParen) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]]]
\ No newline at end of file diff --git a/tests/odt/native/orderedListRoman.native b/tests/odt/native/orderedListRoman.native new file mode 100644 index 000000000..f186e0735 --- /dev/null +++ b/tests/odt/native/orderedListRoman.native @@ -0,0 +1 @@ +Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,UpperRoman,Period) [[Plain[Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,UpperRoman,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,UpperRoman,Period) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]]]
\ No newline at end of file diff --git a/tests/odt/native/orderedListSimple.native b/tests/odt/native/orderedListSimple.native new file mode 100644 index 000000000..90a51856a --- /dev/null +++ b/tests/odt/native/orderedListSimple.native @@ -0,0 +1 @@ +Pandoc (Meta {unMeta = fromList []}) [OrderedList (1,Decimal,Period) [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],OrderedList (1,Decimal,Period) [[Para [Str "New",Space,Str "level!"],OrderedList (1,Decimal,Period) [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]]]
\ No newline at end of file diff --git a/tests/odt/native/referenceToChapter.native b/tests/odt/native/referenceToChapter.native new file mode 100644 index 000000000..fc6c6cf5c --- /dev/null +++ b/tests/odt/native/referenceToChapter.native @@ -0,0 +1 @@ +[Header 1 ("a-chapter",[],[]) [Span ("anchor",[],[]) [],Str "A",Space,Str "chapter"],Para [Str "Some",Space,Str "text."],Header 1 ("another-chapter",[],[]) [Str "Another",Space,Str "chapter"],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Str "."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link [Str "A",Space,Str "chapter"] ("#anchor",""),Str "."]]
\ No newline at end of file diff --git a/tests/odt/native/referenceToListItem.native b/tests/odt/native/referenceToListItem.native new file mode 100644 index 000000000..d009f8d23 --- /dev/null +++ b/tests/odt/native/referenceToListItem.native @@ -0,0 +1 @@ +[OrderedList (1,Decimal,Period) [[Plain [Span ("anchor",[],[]) [],Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "Another",Space,Str "list",Space,Str "item"]]],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Str "list",Space,Str "item",Space,Link [Str "1."] ("#anchor",""),Str "."],Para [],Para []]
\ No newline at end of file diff --git a/tests/odt/native/referenceToText.native b/tests/odt/native/referenceToText.native new file mode 100644 index 000000000..45f7ac44c --- /dev/null +++ b/tests/odt/native/referenceToText.native @@ -0,0 +1 @@ +[Para [Span ("an anchor",[],[]) [],Str "Some",Space,Str "text."],Para [Str "A",Space,Str "reference",Space,Str "to",Space,Link [Str "Some",Space,Str "text"] ("#an anchor",""),Str "."]]
\ No newline at end of file diff --git a/tests/odt/native/simpleTable.native b/tests/odt/native/simpleTable.native new file mode 100644 index 000000000..f94026bd5 --- /dev/null +++ b/tests/odt/native/simpleTable.native @@ -0,0 +1 @@ +[Table [] [] [] [] [[[Plain [Str "Content"]],[Plain [Str "More",Space,Str "content"]]]],Para []]
\ No newline at end of file diff --git a/tests/odt/native/unicode.native b/tests/odt/native/unicode.native new file mode 100644 index 000000000..b6ac9760c --- /dev/null +++ b/tests/odt/native/unicode.native @@ -0,0 +1 @@ +[Para [Str "\8220\8221\8217\231\1256\169\188\1074\1073\1060\1064\246\201\181"]]
\ No newline at end of file diff --git a/tests/odt/native/unorderedList.native b/tests/odt/native/unorderedList.native new file mode 100644 index 000000000..a8c083d13 --- /dev/null +++ b/tests/odt/native/unorderedList.native @@ -0,0 +1 @@ +[BulletList [[Plain [Str "A",Space,Str "list",Space,Str "item"]],[Plain [Str "A",Space,Str "second"]],[Para [Str "A",Space,Str "third"],BulletList [[Para [Str "New",Space,Str "level!"],BulletList [[Plain [Str "And",Space,Str "another!"]],[Plain [Str "It's",Space,Str "great",Space,Str "up",Space,Str "here!"]]]],[Plain [Str "Oh",Space,Str "noes"]],[Plain [Str "We",Space,Str "fell!"]]]],[Plain [Str "Maybe",Space,Str "someone"]],[Plain [Str "Pushed",Space,Str "us?"]]]]
\ No newline at end of file diff --git a/tests/odt/odt/blockquote.odt b/tests/odt/odt/blockquote.odt Binary files differnew file mode 100644 index 000000000..0114e308f --- /dev/null +++ b/tests/odt/odt/blockquote.odt diff --git a/tests/odt/odt/bold.odt b/tests/odt/odt/bold.odt Binary files differnew file mode 100644 index 000000000..49285722e --- /dev/null +++ b/tests/odt/odt/bold.odt diff --git a/tests/odt/odt/citation.odt b/tests/odt/odt/citation.odt Binary files differnew file mode 100644 index 000000000..b6dbe649e --- /dev/null +++ b/tests/odt/odt/citation.odt diff --git a/tests/odt/odt/endnote.odt b/tests/odt/odt/endnote.odt Binary files differnew file mode 100644 index 000000000..c1aba45da --- /dev/null +++ b/tests/odt/odt/endnote.odt diff --git a/tests/odt/odt/expression.odt b/tests/odt/odt/expression.odt Binary files differnew file mode 100644 index 000000000..1085d7008 --- /dev/null +++ b/tests/odt/odt/expression.odt diff --git a/tests/odt/odt/expressionUnevaluated.odt b/tests/odt/odt/expressionUnevaluated.odt Binary files differnew file mode 100644 index 000000000..64df660b6 --- /dev/null +++ b/tests/odt/odt/expressionUnevaluated.odt diff --git a/tests/odt/odt/externalLink.odt b/tests/odt/odt/externalLink.odt Binary files differnew file mode 100644 index 000000000..1d8f55489 --- /dev/null +++ b/tests/odt/odt/externalLink.odt diff --git a/tests/odt/odt/footnote.odt b/tests/odt/odt/footnote.odt Binary files differnew file mode 100644 index 000000000..74915c33c --- /dev/null +++ b/tests/odt/odt/footnote.odt diff --git a/tests/odt/odt/formula.odt b/tests/odt/odt/formula.odt Binary files differnew file mode 100644 index 000000000..5cf5f3451 --- /dev/null +++ b/tests/odt/odt/formula.odt diff --git a/tests/odt/odt/headers.odt b/tests/odt/odt/headers.odt Binary files differnew file mode 100644 index 000000000..9212e9fb1 --- /dev/null +++ b/tests/odt/odt/headers.odt diff --git a/tests/odt/odt/hiddenTextByStyle.odt b/tests/odt/odt/hiddenTextByStyle.odt Binary files differnew file mode 100644 index 000000000..79c40ca98 --- /dev/null +++ b/tests/odt/odt/hiddenTextByStyle.odt diff --git a/tests/odt/odt/hiddenTextByVariable.odt b/tests/odt/odt/hiddenTextByVariable.odt Binary files differnew file mode 100644 index 000000000..ec793d466 --- /dev/null +++ b/tests/odt/odt/hiddenTextByVariable.odt diff --git a/tests/odt/odt/horizontalRule.odt b/tests/odt/odt/horizontalRule.odt Binary files differnew file mode 100644 index 000000000..df09386bc --- /dev/null +++ b/tests/odt/odt/horizontalRule.odt diff --git a/tests/odt/odt/image.odt b/tests/odt/odt/image.odt Binary files differnew file mode 100644 index 000000000..c2fd1e407 --- /dev/null +++ b/tests/odt/odt/image.odt diff --git a/tests/odt/odt/imageIndex.odt b/tests/odt/odt/imageIndex.odt Binary files differnew file mode 100644 index 000000000..220a49047 --- /dev/null +++ b/tests/odt/odt/imageIndex.odt diff --git a/tests/odt/odt/imageWithCaption.odt b/tests/odt/odt/imageWithCaption.odt Binary files differnew file mode 100644 index 000000000..99b5b7af1 --- /dev/null +++ b/tests/odt/odt/imageWithCaption.odt diff --git a/tests/odt/odt/italic.odt b/tests/odt/odt/italic.odt Binary files differnew file mode 100644 index 000000000..d05cfeade --- /dev/null +++ b/tests/odt/odt/italic.odt diff --git a/tests/odt/odt/listBlocks.odt b/tests/odt/odt/listBlocks.odt Binary files differnew file mode 100644 index 000000000..5855e9920 --- /dev/null +++ b/tests/odt/odt/listBlocks.odt diff --git a/tests/odt/odt/orderedListMixed.odt b/tests/odt/odt/orderedListMixed.odt Binary files differnew file mode 100644 index 000000000..1aa50ff06 --- /dev/null +++ b/tests/odt/odt/orderedListMixed.odt diff --git a/tests/odt/odt/orderedListRoman.odt b/tests/odt/odt/orderedListRoman.odt Binary files differnew file mode 100644 index 000000000..7266e89bc --- /dev/null +++ b/tests/odt/odt/orderedListRoman.odt diff --git a/tests/odt/odt/orderedListSimple.odt b/tests/odt/odt/orderedListSimple.odt Binary files differnew file mode 100644 index 000000000..4fe543794 --- /dev/null +++ b/tests/odt/odt/orderedListSimple.odt diff --git a/tests/odt/odt/paragraph.odt b/tests/odt/odt/paragraph.odt Binary files differnew file mode 100644 index 000000000..b635b2164 --- /dev/null +++ b/tests/odt/odt/paragraph.odt diff --git a/tests/odt/odt/referenceAllInOne.odt b/tests/odt/odt/referenceAllInOne.odt Binary files differnew file mode 100644 index 000000000..e9f38e359 --- /dev/null +++ b/tests/odt/odt/referenceAllInOne.odt diff --git a/tests/odt/odt/referenceToChapter.odt b/tests/odt/odt/referenceToChapter.odt Binary files differnew file mode 100644 index 000000000..d4be67b0b --- /dev/null +++ b/tests/odt/odt/referenceToChapter.odt diff --git a/tests/odt/odt/referenceToListItem.odt b/tests/odt/odt/referenceToListItem.odt Binary files differnew file mode 100644 index 000000000..be3aed245 --- /dev/null +++ b/tests/odt/odt/referenceToListItem.odt diff --git a/tests/odt/odt/referenceToText.odt b/tests/odt/odt/referenceToText.odt Binary files differnew file mode 100644 index 000000000..281055aa0 --- /dev/null +++ b/tests/odt/odt/referenceToText.odt diff --git a/tests/odt/odt/simpleTable.odt b/tests/odt/odt/simpleTable.odt Binary files differnew file mode 100644 index 000000000..a00622918 --- /dev/null +++ b/tests/odt/odt/simpleTable.odt diff --git a/tests/odt/odt/strikeout.odt b/tests/odt/odt/strikeout.odt Binary files differnew file mode 100644 index 000000000..3a3f1543a --- /dev/null +++ b/tests/odt/odt/strikeout.odt diff --git a/tests/odt/odt/table.odt b/tests/odt/odt/table.odt Binary files differnew file mode 100644 index 000000000..7a2b1cfae --- /dev/null +++ b/tests/odt/odt/table.odt diff --git a/tests/odt/odt/tableWithCaption.odt b/tests/odt/odt/tableWithCaption.odt Binary files differnew file mode 100644 index 000000000..d44654460 --- /dev/null +++ b/tests/odt/odt/tableWithCaption.odt diff --git a/tests/odt/odt/trackedChanges.odt b/tests/odt/odt/trackedChanges.odt Binary files differnew file mode 100644 index 000000000..5ac493ed7 --- /dev/null +++ b/tests/odt/odt/trackedChanges.odt diff --git a/tests/odt/odt/underlined.odt b/tests/odt/odt/underlined.odt Binary files differnew file mode 100644 index 000000000..d645717b8 --- /dev/null +++ b/tests/odt/odt/underlined.odt diff --git a/tests/odt/odt/unicode.odt b/tests/odt/odt/unicode.odt Binary files differnew file mode 100644 index 000000000..07e200425 --- /dev/null +++ b/tests/odt/odt/unicode.odt diff --git a/tests/odt/odt/unorderedList.odt b/tests/odt/odt/unorderedList.odt Binary files differnew file mode 100644 index 000000000..50a950024 --- /dev/null +++ b/tests/odt/odt/unorderedList.odt diff --git a/tests/odt/odt/variable.odt b/tests/odt/odt/variable.odt Binary files differnew file mode 100644 index 000000000..73ff5f648 --- /dev/null +++ b/tests/odt/odt/variable.odt diff --git a/tests/pipe-tables.native b/tests/pipe-tables.native index eafd21d22..9d499c9c2 100644 --- a/tests/pipe-tables.native +++ b/tests/pipe-tables.native @@ -75,4 +75,12 @@ ,Para [Str "Header-less",Space,Str "one-column:"] ,Table [] [AlignCenter] [0.0] [[]] - [[[Plain [Str "hi"]]]]] + [[[Plain [Str "hi"]]]] +,Para [Str "Indented",Space,Str "left",Space,Str "column:"] +,Table [] [AlignRight,AlignLeft] [0.0,0.0] + [[Plain [Str "Number",Space,Str "of",Space,Str "siblings"]] + ,[Plain [Str "Salary"]]] + [[[Plain [Str "3"]] + ,[Plain [Str "33"]]] + ,[[Plain [Str "4"]] + ,[Plain [Str "44"]]]]] diff --git a/tests/pipe-tables.txt b/tests/pipe-tables.txt index 83debd595..a8803724a 100644 --- a/tests/pipe-tables.txt +++ b/tests/pipe-tables.txt @@ -52,3 +52,10 @@ Header-less one-column: | | |:-:| |hi| + +Indented left column: + +Number of siblings | Salary +------------------:|:------ + 3 | 33 + 4 | 44 diff --git a/tests/test-pandoc.hs b/tests/test-pandoc.hs index 9bc26416f..f7c2f0c1f 100644 --- a/tests/test-pandoc.hs +++ b/tests/test-pandoc.hs @@ -11,6 +11,7 @@ import qualified Tests.Readers.Org import qualified Tests.Readers.HTML import qualified Tests.Readers.RST import qualified Tests.Readers.Docx +import qualified Tests.Readers.Odt import qualified Tests.Readers.Txt2Tags import qualified Tests.Readers.EPUB import qualified Tests.Writers.ConTeXt @@ -51,6 +52,7 @@ tests = [ testGroup "Old" Tests.Old.tests , testGroup "Org" Tests.Readers.Org.tests , testGroup "RST" Tests.Readers.RST.tests , testGroup "Docx" Tests.Readers.Docx.tests + , testGroup "Odt" Tests.Readers.Odt.tests , testGroup "Txt2Tags" Tests.Readers.Txt2Tags.tests , testGroup "EPUB" Tests.Readers.EPUB.tests ] |