From bbe99003f8d25dc65ab12851907ecd5d9aad746c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 16 Jun 2014 22:44:40 -0700 Subject: Naming: Use Docx instead of DocX. For consistency with the existing writer. --- tests/Tests/Readers/DocX.hs | 68 --------------------------------------------- tests/Tests/Readers/Docx.hs | 68 +++++++++++++++++++++++++++++++++++++++++++++ tests/test-pandoc.hs | 4 +-- 3 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 tests/Tests/Readers/DocX.hs create mode 100644 tests/Tests/Readers/Docx.hs (limited to 'tests') diff --git a/tests/Tests/Readers/DocX.hs b/tests/Tests/Readers/DocX.hs deleted file mode 100644 index f4564ea1d..000000000 --- a/tests/Tests/Readers/DocX.hs +++ /dev/null @@ -1,68 +0,0 @@ -module Tests.Readers.DocX (tests) where - -import Text.Pandoc.Options -import Text.Pandoc.Readers.Native -import Text.Pandoc.Definition -import Tests.Helpers -import Test.Framework -import qualified Data.ByteString.Lazy as B -import Text.Pandoc.Readers.DocX - -compareOutput :: FilePath -> FilePath -> IO (Pandoc, Pandoc) -compareOutput docxFile nativeFile = do - df <- B.readFile docxFile - nf <- Prelude.readFile nativeFile - return $ (readDocX def df, readNative nf) - -testCompare' :: String -> FilePath -> FilePath -> IO Test -testCompare' name docxFile nativeFile = do - (dp, np) <- compareOutput docxFile nativeFile - return $ test id name (dp, np) - -testCompare :: String -> FilePath -> FilePath -> Test -testCompare name docxFile nativeFile = - buildTest $ testCompare' name docxFile nativeFile - - -tests :: [Test] -tests = [ testGroup "inlines" - [ testCompare - "font formatting" - "docx.inline_formatting.docx" - "docx.inline_formatting.native" - , testCompare - "hyperlinks" - "docx.links.docx" - "docx.links.native" - , testCompare - "inline image with reference output" - "docx.image.docx" - "docx.image_no_embed.native" - , testCompare - "handling unicode input" - "docx.unicode.docx" - "docx.unicode.native"] - , testGroup "blocks" - [ testCompare - "headers" - "docx.headers.docx" - "docx.headers.native" - , testCompare - "lists" - "docx.lists.docx" - "docx.lists.native" - , testCompare - "footnotes and endnotes" - "docx.notes.docx" - "docx.notes.native" - , testCompare - "blockquotes (parsing indent as blockquote)" - "docx.block_quotes.docx" - "docx.block_quotes_parse_indent.native" - , testCompare - "tables" - "docx.tables.docx" - "docx.tables.native" - ] - ] - diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs new file mode 100644 index 000000000..0a963ddc6 --- /dev/null +++ b/tests/Tests/Readers/Docx.hs @@ -0,0 +1,68 @@ +module Tests.Readers.Docx (tests) where + +import Text.Pandoc.Options +import Text.Pandoc.Readers.Native +import Text.Pandoc.Definition +import Tests.Helpers +import Test.Framework +import qualified Data.ByteString.Lazy as B +import Text.Pandoc.Readers.Docx + +compareOutput :: FilePath -> FilePath -> IO (Pandoc, Pandoc) +compareOutput docxFile nativeFile = do + df <- B.readFile docxFile + nf <- Prelude.readFile nativeFile + return $ (readDocx def df, readNative nf) + +testCompare' :: String -> FilePath -> FilePath -> IO Test +testCompare' name docxFile nativeFile = do + (dp, np) <- compareOutput docxFile nativeFile + return $ test id name (dp, np) + +testCompare :: String -> FilePath -> FilePath -> Test +testCompare name docxFile nativeFile = + buildTest $ testCompare' name docxFile nativeFile + + +tests :: [Test] +tests = [ testGroup "inlines" + [ testCompare + "font formatting" + "docx.inline_formatting.docx" + "docx.inline_formatting.native" + , testCompare + "hyperlinks" + "docx.links.docx" + "docx.links.native" + , testCompare + "inline image with reference output" + "docx.image.docx" + "docx.image_no_embed.native" + , testCompare + "handling unicode input" + "docx.unicode.docx" + "docx.unicode.native"] + , testGroup "blocks" + [ testCompare + "headers" + "docx.headers.docx" + "docx.headers.native" + , testCompare + "lists" + "docx.lists.docx" + "docx.lists.native" + , testCompare + "footnotes and endnotes" + "docx.notes.docx" + "docx.notes.native" + , testCompare + "blockquotes (parsing indent as blockquote)" + "docx.block_quotes.docx" + "docx.block_quotes_parse_indent.native" + , testCompare + "tables" + "docx.tables.docx" + "docx.tables.native" + ] + ] + diff --git a/tests/test-pandoc.hs b/tests/test-pandoc.hs index 9f9d85147..c07a51ec5 100644 --- a/tests/test-pandoc.hs +++ b/tests/test-pandoc.hs @@ -9,7 +9,7 @@ import qualified Tests.Readers.LaTeX import qualified Tests.Readers.Markdown import qualified Tests.Readers.Org import qualified Tests.Readers.RST -import qualified Tests.Readers.DocX +import qualified Tests.Readers.Docx import qualified Tests.Writers.ConTeXt import qualified Tests.Writers.LaTeX import qualified Tests.Writers.HTML @@ -39,7 +39,7 @@ tests = [ testGroup "Old" Tests.Old.tests , testGroup "Markdown" Tests.Readers.Markdown.tests , testGroup "Org" Tests.Readers.Org.tests , testGroup "RST" Tests.Readers.RST.tests - , testGroup "DocX" Tests.Readers.DocX.tests + , testGroup "Docx" Tests.Readers.Docx.tests ] ] -- cgit v1.2.3