Skip to content

Commit 330cbe9

Browse files
author
Cassandra Comar
committed
fix broken explicit export tests
1 parent 9cde704 commit 330cbe9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

haskell-language-server.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,7 @@ test-suite hls-explicit-record-fields-plugin-tests
13421342
, ghcide
13431343
, haskell-language-server:hls-explicit-record-fields-plugin
13441344
, hls-test-utils == 2.11.0.0
1345+
, aeson
13451346

13461347
-----------------------------
13471348
-- overloaded record dot plugin

plugins/hls-explicit-record-fields-plugin/test/Main.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
module Main ( main ) where
55

6+
import qualified Data.Aeson as A
67
import Data.Either (rights)
78
import Data.Text (Text)
89
import qualified Data.Text as T
@@ -300,6 +301,7 @@ mkInlayHintsTest fp postfix line assert =
300301
testCase (fp ++ concat postfix) $
301302
runSessionWithServer def plugin testDataDir $ do
302303
doc <- openDoc (fp ++ ".hs") "haskell"
304+
setConfigSection "haskell" (createConfig False)
303305
inlayHints <- getInlayHints doc (lineRange line)
304306
liftIO $ assert inlayHints
305307
where
@@ -396,3 +398,9 @@ mkPragmaTextEdit line =
396398

397399
testDataDir :: FilePath
398400
testDataDir = "plugins" </> "hls-explicit-record-fields-plugin" </> "test" </> "testdata"
401+
402+
createConfig :: Bool -> A.Value
403+
createConfig on = A.object [ "plugin"
404+
A..= A.object [ "ghcide-type-lenses"
405+
A..= A.object [ "config"
406+
A..= A.object [ "localBindingInlayHintOn" A..= A.Bool on ]]]]

0 commit comments

Comments
 (0)