hls-test-utils-1.0.0.0: Utilities used in the tests of Haskell Language Server
Safe HaskellNone
LanguageHaskell2010

Test.Hls.Util

Synopsis

Documentation

expectNoMoreDiagnostics :: Seconds -> TextDocumentIdentifier -> String -> Session () Source #

wait for timeout seconds and report an assertion failure if any diagnostic messages arrive in that period

data GhcVersion Source #

Constructors

GHC810 
GHC88 
GHC86 
GHC84 

Instances

Instances details
Eq GhcVersion Source # 
Instance details

Defined in Test.Hls.Util

Show GhcVersion Source # 
Instance details

Defined in Test.Hls.Util

data OS Source #

Constructors

Windows 
MacOS 
Linux 

Instances

Instances details
Eq OS Source # 
Instance details

Defined in Test.Hls.Util

Methods

(==) :: OS -> OS -> Bool #

(/=) :: OS -> OS -> Bool #

Show OS Source # 
Instance details

Defined in Test.Hls.Util

Methods

showsPrec :: Int -> OS -> ShowS #

show :: OS -> String #

showList :: [OS] -> ShowS #

data EnvSpec Source #

Constructors

HostOS OS 
GhcVer GhcVersion 

Instances

Instances details
Eq EnvSpec Source # 
Instance details

Defined in Test.Hls.Util

Methods

(==) :: EnvSpec -> EnvSpec -> Bool #

(/=) :: EnvSpec -> EnvSpec -> Bool #

Show EnvSpec Source # 
Instance details

Defined in Test.Hls.Util

ignoreInEnv :: [EnvSpec] -> String -> TestTree -> TestTree Source #

IgnroeTest if any of environmental spec mathces the current environment.

knownBrokenInEnv :: [EnvSpec] -> String -> TestTree -> TestTree Source #

Mark as broken if any of environmental spec mathces the current environment.

type SymbolLocation = (FilePath, Int, Int) Source #

To locate a symbol, we provide a path to the file from the HLS root directory, the line number, and the column number. (0 indexed.)

waitForDiagnosticsFromSourceWithTimeout :: Seconds -> TextDocumentIdentifier -> String -> Session [Diagnostic] Source #

wait for timeout seconds and return diagnostics for the given document and source. If timeout is 0 it will wait until the session timeout

withCurrentDirectoryInTmp :: FilePath -> IO a -> IO a Source #

Like withCurrentDirectory, but will copy the directory over to the system temporary directory first to avoid haskell-language-server's source tree from interfering with the cradle