Skip to content

Commit 685d4e7

Browse files
committed
Try force decoding of golden test files as utf8
1 parent d83e651 commit 685d4e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/functional/Eval.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ where
99

1010
import Control.Applicative.Combinators (skipManyTill)
1111
import Control.Monad.IO.Class (MonadIO (liftIO))
12-
import qualified Data.Text.IO as T
12+
import qualified Data.ByteString as B
13+
import qualified Data.Text.Encoding as T
1314
import Language.Haskell.LSP.Test
1415
import Language.Haskell.LSP.Types (ApplyWorkspaceEditRequest, CodeLens (CodeLens, _command, _range),
1516
Command (_title),
@@ -99,7 +100,7 @@ goldenTest input = runSession hlsCommand fullCaps evalPath $ do
99100
executeCommand c
100101
_resp :: ApplyWorkspaceEditRequest <- skipManyTill anyMessage message
101102
edited <- documentContents doc
102-
expected <- liftIO $ T.readFile $ evalPath </> input <.> "expected"
103+
expected <- liftIO $ fmap T.decodeUtf8 $ B.readFile $ evalPath </> input <.> "expected"
103104
liftIO $ edited @?= expected
104105

105106
evalPath :: FilePath

0 commit comments

Comments
 (0)