forked from filipg/gonito
Handle JSON Lines files
This commit is contained in:
parent
77312aa5a3
commit
c52b613ac4
@ -141,8 +141,8 @@ expectedFileName = "expected.tsv"
|
||||
|
||||
doesExpectedExist :: FilePath -> IO Bool
|
||||
doesExpectedExist fp = do
|
||||
ef <- findFilePossiblyCompressed (fp </> expectedFileName)
|
||||
return $ isJust ef
|
||||
efs <- mapM (\ext -> findFilePossiblyCompressed (fp </> expectedFileName -<.> ext)) extensionsHandled
|
||||
return $ not $ null $ catMaybes efs
|
||||
|
||||
checkTestDir :: Channel -> (Key Challenge) -> Challenge -> SHA1 -> FilePath -> Handler ()
|
||||
checkTestDir chan challengeId challenge commit testDir = do
|
||||
|
@ -37,7 +37,7 @@ import Options.Applicative
|
||||
|
||||
import System.IO (readFile)
|
||||
|
||||
import System.FilePath (takeFileName, dropExtensions)
|
||||
import System.FilePath (takeFileName, dropExtensions, (-<.>))
|
||||
|
||||
import Data.Text (pack, unpack)
|
||||
|
||||
@ -411,7 +411,8 @@ getOutFilePath repoDir test = repoDir </> (T.unpack $ testName test) </> outFile
|
||||
findOutFile :: FilePath -> Test -> IO (Maybe FilePath)
|
||||
findOutFile repoDir test = do
|
||||
let baseOut = getOutFilePath repoDir test
|
||||
findFilePossiblyCompressed baseOut
|
||||
ofs <- mapM (\ext -> findFilePossiblyCompressed (baseOut -<.> ext)) extensionsHandled
|
||||
return $ listToMaybe $ catMaybes ofs
|
||||
|
||||
doesOutExist :: FilePath -> Entity Test -> IO Bool
|
||||
doesOutExist repoDir (Entity _ test) = do
|
||||
|
@ -126,7 +126,7 @@ library
|
||||
, filemanip
|
||||
, cryptohash
|
||||
, markdown
|
||||
, geval >= 1.13.0.0 && < 1.17
|
||||
, geval >= 1.16.1.0 && < 1.17
|
||||
, filepath
|
||||
, yesod-table
|
||||
, regex-tdfa
|
||||
|
Loading…
Reference in New Issue
Block a user