add back lost filtering of multibyte chars in prop_encode_decode_roundtrip
I had thought using ByteString would avoid the problem, but the quickcheck property is still taking Arbitrary String input, so the use of ByteString internally doesn't matter.
This commit is contained in:
parent
3266ad3ff7
commit
faf5415163
1 changed files with 9 additions and 2 deletions
|
@ -35,6 +35,13 @@ decode b = case S.uncons b of
|
|||
encode :: RawFilePath -> S.ByteString
|
||||
encode s = encodeBS $ "\"" ++ encode_c (decodeBS s) ++ "\""
|
||||
|
||||
{- For quickcheck. -}
|
||||
{- For quickcheck.
|
||||
-
|
||||
- See comment on Utility.Format.prop_encode_c_decode_c
|
||||
-_roundtrip for
|
||||
- why this only tests chars < 256
|
||||
-}
|
||||
prop_encode_decode_roundtrip :: FilePath -> Bool
|
||||
prop_encode_decode_roundtrip s = s == fromRawFilePath (decode (encode (toRawFilePath s)))
|
||||
prop_encode_decode_roundtrip s = s' == fromRawFilePath (decode (encode (toRawFilePath s')))
|
||||
where
|
||||
s' = filter (\c -> ord c < 256) s
|
||||
|
|
Loading…
Reference in a new issue