forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHieBios.hs
More file actions
19 lines (17 loc) · 708 Bytes
/
HieBios.hs
File metadata and controls
19 lines (17 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE OverloadedStrings #-}
module HieBios (tests) where
import Control.Lens ((^.))
import Control.Monad.IO.Class
import qualified Data.Text as T
import qualified Language.LSP.Protocol.Lens as L
import Test.Hls
import Test.Hls.Command
tests :: TestTree
tests = testGroup "hie-bios"
[ testCase "loads main-is module" $ do
runSession hlsLspCommand fullCaps "test/testdata/hieBiosMainIs" $ do
_ <- openDoc "Main.hs" "haskell"
(diag:_) <- waitForDiagnostics
liftIO $ "Top-level binding with no type signature:" `T.isInfixOf` (diag ^. L.message)
@? "Expected missing top-level binding diagnostic"
]