Skip to content

Commit

Permalink
fix script results
Browse files Browse the repository at this point in the history
changelog_begin
changelog_end
  • Loading branch information
cocreature committed Oct 25, 2021
1 parent 0ee59f5 commit 75720f8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bazel-haskell-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ load("@os_info//:os_info.bzl", "is_linux", "is_windows")
load("@dadew//:dadew.bzl", "dadew_tool_home")
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")

GHCIDE_REV = "e28a78b9a450fa7970320e78175b8dd382ce0fbd"
GHCIDE_SHA256 = "b038f995c5b71d07b3f0fc973aa0970780bb9ad0365c6552a75ec5264fd3f8a6"
GHCIDE_REV = "ba6e59e8d15206ac40f258adb71f59a2563599cf"
GHCIDE_SHA256 = "986aaa0254272cef9b3192e746c3fc93a3a9dc9e338bdf7325483473225591c2"
JS_JQUERY_VERSION = "3.3.1"
JS_DGTABLE_VERSION = "0.5.2"
JS_FLOT_VERSION = "0.8.3"
Expand Down
23 changes: 23 additions & 0 deletions compiler/lsp-tests/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{-# LANGUAGE TypeOperators #-}
module Main (main) where

import Control.Concurrent
import Control.Applicative.Combinators
import Control.Lens hiding (List, children)
import Control.Monad
Expand Down Expand Up @@ -64,6 +65,7 @@ main = do
, includePathTests damlcPath
, multiPackageTests damlcPath
, completionTests run runScenarios
, raceTests run
]

conf :: SessionConfig
Expand Down Expand Up @@ -1019,6 +1021,27 @@ multiPackageTests damlc
]
]

raceTests
:: (forall a. Session a -> IO a)
-> TestTree
raceTests run = testGroup "race tests"
[ testCaseSteps "race code lens & hover requests" $ \step -> run $ do
main' <- openDoc' "Main.daml" damlId $ T.unlines
[ "module Main where"
, "single : Scenario ()"
, "single = scenario do"
, " assert (True == True)"
]
lensId <- sendRequest STextDocumentCodeLens (CodeLensParams Nothing Nothing main')
liftIO $ threadDelay (5*1000000)
hoverId <- sendRequest STextDocumentHover (HoverParams main' (Position 2 13) Nothing)
liftIO $ step "waiting for lens response"
_ <- skipManyTill anyMessage (responseForId STextDocumentCodeLens lensId)
liftIO $ step "waiting for hover response"
_ <- skipManyTill anyMessage (responseForId STextDocumentHover hoverId)
closeDoc main'
]

linkToLocation :: [LocationLink] -> [Location]
linkToLocation = map (\LocationLink{_targetUri,_targetRange} -> Location _targetUri _targetRange)

Expand Down

0 comments on commit 75720f8

Please sign in to comment.