diff --git a/test/FASTASpec.hs b/test/FASTASpec.hs index 38bd83b..4f1cbb3 100644 --- a/test/FASTASpec.hs +++ b/test/FASTASpec.hs @@ -7,6 +7,7 @@ import Bio.FASTA.Parser (parseOnly) import Bio.FASTA.Type (Fasta, FastaItem (..)) import Bio.Sequence (bareSequence) import Control.Monad.IO.Class (liftIO) +import qualified Data.Text as T import Data.Text.IO (readFile) import Prelude hiding (readFile, writeFile) import System.Directory (removeFile) @@ -70,7 +71,7 @@ parseBadFile path cf = it ("correctly parses bad fasta from file " <> path) $ do res <- liftIO (readFile path) let badRes = parseOnly fastaP res - badRes `shouldBe` cf + noTabs badRes `shouldBe` cf writeFile :: FilePath -> Fasta Char -> Spec writeFile path cf = @@ -79,3 +80,6 @@ writeFile path cf = fasta <- fromFile path removeFile path fasta `shouldBe` cf + +noTabs :: String -> String +noTabs = T.unpack . T.replace "\t" " " . T.pack