Skip to content

Commit

Permalink
Fix tests on 9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jan 5, 2025
1 parent 0545e47 commit 2110c65
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/encoding/EncodingSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ tests =
let str = [toEnum 55296, toEnum 55297]
encoded = encodeWithTE utf16le str
decoded = decodeWithTE utf16le =<< encoded
#if __GLASGOW_HASKELL__ >= 910
#if __GLASGOW_HASKELL__ >= 912
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
#elif __GLASGOW_HASKELL__ >= 910
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")\n") Nothing))
#elif __GLASGOW_HASKELL__ >= 904
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
Expand Down Expand Up @@ -72,7 +74,9 @@ tests =
let str = [toEnum 0xDFF0, toEnum 0xDFF2]
encoded = encodeWithTE (mkUTF8 RoundtripFailure) str
decoded = decodeWithTE (mkUTF8 RoundtripFailure) =<< encoded
#if __GLASGOW_HASKELL__ >= 910
#if __GLASGOW_HASKELL__ >= 912
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
#elif __GLASGOW_HASKELL__ >= 910
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")\n") Nothing))
#elif __GLASGOW_HASKELL__ >= 904
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
Expand Down

0 comments on commit 2110c65

Please sign in to comment.