Skip to content

Commit 2110c65

Browse files
committed
Fix tests on 9.12
1 parent 0545e47 commit 2110c65

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/encoding/EncodingSpec.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ tests =
4040
let str = [toEnum 55296, toEnum 55297]
4141
encoded = encodeWithTE utf16le str
4242
decoded = decodeWithTE utf16le =<< encoded
43-
#if __GLASGOW_HASKELL__ >= 910
43+
#if __GLASGOW_HASKELL__ >= 912
44+
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
45+
#elif __GLASGOW_HASKELL__ >= 910
4446
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")\n") Nothing))
4547
#elif __GLASGOW_HASKELL__ >= 904
4648
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
@@ -72,7 +74,9 @@ tests =
7274
let str = [toEnum 0xDFF0, toEnum 0xDFF2]
7375
encoded = encodeWithTE (mkUTF8 RoundtripFailure) str
7476
decoded = decodeWithTE (mkUTF8 RoundtripFailure) =<< encoded
75-
#if __GLASGOW_HASKELL__ >= 910
77+
#if __GLASGOW_HASKELL__ >= 912
78+
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))
79+
#elif __GLASGOW_HASKELL__ >= 910
7680
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")\n") Nothing))
7781
#elif __GLASGOW_HASKELL__ >= 904
7882
in decoded === Left (EncodingError ("recoverEncode: invalid argument (cannot encode character " <> show (head str) <> ")") Nothing))

0 commit comments

Comments
 (0)