diff --git a/test/Data/CSV/SlurpSpec.hs b/test/Data/CSV/SlurpSpec.hs index cd29130..0ed9bdf 100644 --- a/test/Data/CSV/SlurpSpec.hs +++ b/test/Data/CSV/SlurpSpec.hs @@ -93,6 +93,7 @@ decodeRawRowsSpec = describe "decodeRawRows" $ mapM_ , ( "odd chunk", oddChunkIn, normalRes ) , ( "no newline", noNewlineIn, normalRes ) , ( "malformed", malformedIn, malformedRes ) + , ( "blank end", blankEndIn, blankEndRes ) ] where @@ -158,6 +159,11 @@ decodeRawRowsSpec = describe "decodeRawRows" $ mapM_ , "baz,quux\r\n" ] + blankEndIn = + [ "foo,bar,\r\n" + , "baz,quux\r\n" + ] + normalRes = [ ["foo", "bar"] , ["baz", "quux"] @@ -188,6 +194,11 @@ decodeRawRowsSpec = describe "decodeRawRows" $ mapM_ , ["baz", "quux"] ] + blankEndRes = + [ ["foo", "bar", ""] + , ["baz", "quux"] + ] + decodeUTF8Spec :: Spec decodeUTF8Spec = describe "decodeUTF8" $ mapM_ ( \(label, input, expected) -> context label $