aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorChristian Despres <50160106+despresc@users.noreply.github.com>2020-09-13 10:48:14 -0400
committerGitHub <noreply@github.com>2020-09-13 07:48:14 -0700
commitcae155b095e5182cc1b342b21f7430e40afe7ba8 (patch)
tree82b6342b0a8dc6f98ce73188bb89ae5ad0267060 /test/Tests/Readers
parent2109ded7101dba0ac48c9b60cdf454ad39a7e272 (diff)
downloadpandoc-cae155b095e5182cc1b342b21f7430e40afe7ba8.tar.gz
Fix hlint suggestions, update hlint.yaml (#6680)
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Docx.hs2
-rw-r--r--test/Tests/Readers/Man.hs2
-rw-r--r--test/Tests/Readers/Muse.hs2
-rw-r--r--test/Tests/Readers/Org/Block/Table.hs2
-rw-r--r--test/Tests/Readers/Org/Directive.hs2
-rw-r--r--test/Tests/Readers/Txt2Tags.hs2
6 files changed, 6 insertions, 6 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 456e0affe..80abc38f6 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -33,7 +33,7 @@ import Text.Pandoc.UTF8 as UTF8
-- tests. Since we do our own normalization, we want to make sure
-- we're doing it right.
-data NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc}
+newtype NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc}
deriving Show
noNorm :: Pandoc -> NoNormPandoc
diff --git a/test/Tests/Readers/Man.hs b/test/Tests/Readers/Man.hs
index 7280f15f2..f591aa00d 100644
--- a/test/Tests/Readers/Man.hs
+++ b/test/Tests/Readers/Man.hs
@@ -68,7 +68,7 @@ tests = [
testGroup "Escapes" [
"fonts" =:
"aa\\fIbb\\fRcc"
- =?>para (str "aa" <> (emph $ str "bb") <> str "cc")
+ =?>para (str "aa" <> emph (str "bb") <> str "cc")
, "nested fonts" =:
"\\f[BI]hi\\f[I] there\\f[R]"
=?> para (emph (strong (text "hi") <> text " there"))
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 60a5e4b56..4ec1631e0 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -51,7 +51,7 @@ simpleTable' n capt headers rows
(TableFoot nullAttr [])
where
toRow = Row nullAttr . map simpleCell
- toHeaderRow l = if null l then [] else [toRow l]
+ toHeaderRow l = [toRow l | not (null l)]
-- Tables don't round-trip yet
--
diff --git a/test/Tests/Readers/Org/Block/Table.hs b/test/Tests/Readers/Org/Block/Table.hs
index d35d17979..ab404648e 100644
--- a/test/Tests/Readers/Org/Block/Table.hs
+++ b/test/Tests/Readers/Org/Block/Table.hs
@@ -35,7 +35,7 @@ simpleTable'' capt spec headers rows
(TableFoot nullAttr [])
where
toRow = Row nullAttr . map simpleCell
- toHeaderRow l = if null l then [] else [toRow l]
+ toHeaderRow l = [toRow l | not (null l)]
tests :: [TestTree]
tests =
diff --git a/test/Tests/Readers/Org/Directive.hs b/test/Tests/Readers/Org/Directive.hs
index ba012a69f..727a29658 100644
--- a/test/Tests/Readers/Org/Directive.hs
+++ b/test/Tests/Readers/Org/Directive.hs
@@ -30,7 +30,7 @@ testWithFiles :: (ToString c)
-> (T.Text, c) -- ^ (input, expected value)
-> TestTree
testWithFiles fileDefs = test (orgWithFiles fileDefs)
- where
+
orgWithFiles :: [(FilePath, BS.ByteString)] -> T.Text -> Pandoc
orgWithFiles fileDefs input =
let readOrg' = readOrg def{ readerExtensions = getDefaultExtensions "org" }
diff --git a/test/Tests/Readers/Txt2Tags.hs b/test/Tests/Readers/Txt2Tags.hs
index 3989b2434..989b7f673 100644
--- a/test/Tests/Readers/Txt2Tags.hs
+++ b/test/Tests/Readers/Txt2Tags.hs
@@ -54,7 +54,7 @@ simpleTable'' spec headers rows
(TableFoot nullAttr [])
where
toRow = Row nullAttr . map simpleCell
- toHeaderRow l = if null l then [] else [toRow l]
+ toHeaderRow l = [toRow l | not (null l)]
tests :: [TestTree]
tests =