mirror of
https://github.com/typeable/file-embed.git
synced 2024-07-14 10:40:26 +03:00
updated for '\r'
This commit is contained in:
parent
752a2b80a6
commit
65cc8e5e90
@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
import Control.Monad (unless)
|
||||
import qualified Data.ByteString as B (ByteString)
|
||||
import qualified Data.ByteString as B (ByteString, filter)
|
||||
import Data.FileEmbed
|
||||
import System.FilePath ((</>))
|
||||
|
||||
@ -22,7 +22,7 @@ main = do
|
||||
filter (/= '\r') str @?= "foo\n"
|
||||
|
||||
let mbs = $(embedFileIfExists "test/sample/foo")
|
||||
mbs @?= Just "foo\r\n"
|
||||
fmap (B.filter (/= fromIntegral (fromEnum '\r'))) mbs @?= Just "foo\n"
|
||||
|
||||
let mbs2 = $(embedFileIfExists "test/sample/foo2") :: Maybe B.ByteString
|
||||
mbs2 @?= Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user