File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,16 @@ jobs:
1919 include :
2020 - os : macOS-latest
2121 ghc : ' 9.2.6'
22+ cabal : ' 3.8.1.0'
2223 - os : macOS-latest
2324 ghc : ' 9.4.4'
25+ cabal : ' 3.8.1.0'
2426 - os : windows-latest
2527 ghc : ' 9.2.6'
28+ cabal : ' 3.8.1.0'
2629 - os : windows-latest
2730 ghc : ' 9.4.4'
31+ cabal : ' 3.8.1.0'
2832 steps :
2933 - uses : actions/checkout@v3
3034
6872 git diff --exit-code
6973
7074 i386 :
71- needs : build
7275 runs-on : ubuntu-latest
7376 container :
7477 image : i386/ubuntu:bionic
@@ -81,15 +84,14 @@ jobs:
8184 - uses : actions/checkout@v1
8285 - name : Test
8386 run : |
84- source ~/.ghcup/env
87+ . ~/.ghcup/env
8588 cabal update
8689 cabal test
8790
8891 # We use github.com/haskell self-hosted runners for ARM testing.
8992 # If they become unavailable in future, put ['armv7', 'aarch64']
9093 # back to emulation jobs above.
9194 arm :
92- needs : build
9395 runs-on : [self-hosted, Linux, ARM64]
9496 strategy :
9597 fail-fast : true
@@ -108,13 +110,13 @@ jobs:
108110 uses : docker://hasufell/arm32v7-ubuntu-haskell:focal
109111 name : Run build (arm32v7 linux)
110112 with :
111- args : sh -c "ghcup install ghc 9.2.2 && cabal -w ghc- 9.2.2 update && cabal -w ghc-9.2.2 test "
113+ args : sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"
112114
113115 - if : matrix.arch == 'arm64v8'
114116 uses : docker://hasufell/arm64v8-ubuntu-haskell:focal
115117 name : Run build (arm64v8 linux)
116118 with :
117- args : sh -c "ghcup install ghc 9.2.2 && cabal -w ghc- 9.2.2 update && cabal -w ghc-9.2.2 test "
119+ args : sh -c "cabal update && ghcup install ghc --isolate=/usr --force 9.2.2 && cabal test -w ghc-9.2.2"
118120
119121 darwin_arm :
120122 runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE CPP #-}
12{-# LANGUAGE ScopedTypeVariables #-}
23{-# LANGUAGE ViewPatterns #-}
34{-# LANGUAGE TypeApplications #-}
@@ -38,7 +39,11 @@ tests =
3839 let str = [toEnum 55296 , toEnum 55297 ]
3940 encoded = encodeWithTE utf16le str
4041 decoded = decodeWithTE utf16le =<< encoded
42+ #if __GLASGOW_HASKELL__ >= 904
43+ in decoded === Left (EncodingError (" recoverEncode: invalid argument (cannot encode character " <> show (head str) <> " )" ) Nothing ))
44+ #else
4145 in decoded === Left (EncodingError " recoverEncode: invalid argument (invalid character)" Nothing ))
46+ #endif
4247 , (" ucs2 handles invalid surrogate pairs" ,
4348 property $
4449 let str = [toEnum 55296 , toEnum 55297 ]
@@ -64,7 +69,11 @@ tests =
6469 let str = [toEnum 0xDFF0 , toEnum 0xDFF2 ]
6570 encoded = encodeWithTE (mkUTF8 RoundtripFailure ) str
6671 decoded = decodeWithTE (mkUTF8 RoundtripFailure ) =<< encoded
72+ #if __GLASGOW_HASKELL__ >= 904
73+ in decoded === Left (EncodingError (" recoverEncode: invalid argument (cannot encode character " <> show (head str) <> " )" ) Nothing ))
74+ #else
6775 in decoded === Left (EncodingError " recoverEncode: invalid argument (invalid character)" Nothing ))
76+ #endif
6877
6978 , (" cannot roundtrip arbitrary bytes through utf-16 (with RoundtripFailure)" ,
7079 property $
You can’t perform that action at this time.
0 commit comments