1 module Bio.Util.Test where
    2 
    3 import Bio.Util as U
    4 import Bio.Util.TestBase
    5 
    6 import qualified Data.ByteString.Lazy.Char8 as BC
    7 
    8 tests :: [Test]
    9 tests = [ T "BS lines replacement" prop_bs_lines
   10         , T "BS internal lines"    prop_bs_mylines
   11         ]
   12 
   13 -- test the 'lines' that is going to be used
   14 prop_bs_lines :: String -> Bool
   15 prop_bs_lines xs = Prelude.lines xs == (map BC.unpack . U.lines . BC.pack) xs
   16 
   17 -- test mylines, which may be used or not, depending on whether we detect the LBS bug
   18 prop_bs_mylines :: String -> Bool
   19 prop_bs_mylines xs = Prelude.lines xs == (map BC.unpack . mylines . BC.pack) xs