Commit f15d2fee authored by Loïc Chapron's avatar Loïc Chapron

fix TSV import test

parent 9c1c0360
......@@ -349,9 +349,10 @@ testCorrectFile bs =
----------Test headers added to ggt
-- use a map to remove \r that sometimes appear at the end of a line
testAllHeadersPresence :: [Text] -> Either Text [Text]
testAllHeadersPresence headers = do
let listHeaders = filter (`notElem` headers) ["Publication Day", "Publication Month", "Publication Year", "Authors", "Title", "Source", "Abstract"]
let listHeaders = filter (`notElem` (map (T.replace (T.pack "\r") (T.pack ""))headers)) ["Publication Day", "Publication Month", "Publication Year", "Authors", "Title", "Source", "Abstract"]
if null listHeaders
then Right headers
else Left ((pack " Missing column : ") <> T.intercalate ", " listHeaders)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment