moved decodeUTF8 into helpers section
This commit is contained in:
@@ -40,8 +40,8 @@ spec = describe "Data.CSV.Sip" $ do
|
||||
labelFieldsSpec
|
||||
decodeRowsSpec
|
||||
decodeRawRowsSpec
|
||||
decodeUTF8Spec
|
||||
toBytesSpec
|
||||
decodeUTF8Spec
|
||||
|
||||
encodeCSVSpec :: Spec
|
||||
encodeCSVSpec = describe "encodeCSV" $ do
|
||||
@@ -327,6 +327,14 @@ decodeRawRowsSpec = describe "decodeRawRows" $ mapM_
|
||||
, ["baz", "quux"]
|
||||
]
|
||||
|
||||
toBytesSpec :: Spec
|
||||
toBytesSpec = describe "toBytes" $ let
|
||||
input = ["ab", "cd"]
|
||||
expected = map (fromIntegral . ord) "abcd"
|
||||
in it ("should be " ++ show expected) $ do
|
||||
result <- runConduit $ sourceList input .| toBytes .| consume
|
||||
result `shouldBe` expected
|
||||
|
||||
decodeUTF8Spec :: Spec
|
||||
decodeUTF8Spec = describe "decodeUTF8" $ mapM_
|
||||
( \(label, input, expected) -> context label $
|
||||
@@ -341,12 +349,4 @@ decodeUTF8Spec = describe "decodeUTF8" $ mapM_
|
||||
, ( "blank", "", Just "" )
|
||||
]
|
||||
|
||||
toBytesSpec :: Spec
|
||||
toBytesSpec = describe "toBytes" $ let
|
||||
input = ["ab", "cd"]
|
||||
expected = map (fromIntegral . ord) "abcd"
|
||||
in it ("should be " ++ show expected) $ do
|
||||
result <- runConduit $ sourceList input .| toBytes .| consume
|
||||
result `shouldBe` expected
|
||||
|
||||
--jl
|
||||
|
||||
Reference in New Issue
Block a user