@@ -6,27 +6,29 @@ module Progress (tests) where
6
6
import Control.Applicative.Combinators
7
7
import Control.Lens hiding ((.=))
8
8
import Control.Monad.IO.Class
9
+ import Data.Aeson (encode, decode, object, toJSON, Value, (.=))
9
10
import Data.Default
11
+ import Data.Maybe (fromJust)
12
+ import Data.List (delete)
13
+ import Data.Text (Text, pack)
10
14
import Ide.Plugin.Config
11
15
import Language.Haskell.LSP.Test
12
16
import Language.Haskell.LSP.Types
13
17
import qualified Language.Haskell.LSP.Types.Lens as L
14
18
import Language.Haskell.LSP.Types.Capabilities
19
+ import System.FilePath ((</>))
15
20
import Test.Hls.Util
16
21
import Test.Tasty
17
22
import Test.Tasty.ExpectedFailure (ignoreTestBecause)
18
23
import Test.Tasty.HUnit
19
- import Data.Text (Text)
20
- import Data.Aeson (encode, decode, object, toJSON, Value, (.=))
21
- import Data.Maybe (fromJust)
22
- import Data.List (delete)
23
24
24
25
tests :: TestTree
25
26
tests = testGroup "window/workDoneProgress" [
26
27
testCase "sends indefinite progress notifications" $
27
28
runSession hlsCommand progressCaps "test/testdata" $ do
28
- _ <- openDoc "hlint/ApplyRefact2.hs" "haskell"
29
- expectProgressReports ["Setting up hlint (for hlint/ApplyRefact2.hs)", "Processing"]
29
+ let path = "hlint" </> "ApplyRefact2.hs"
30
+ _ <- openDoc path "haskell"
31
+ expectProgressReports [pack ("Setting up hlint (for " ++ path ++ ")"), "Processing"]
30
32
, testCase "eval plugin sends progress reports" $
31
33
runSession hlsCommand progressCaps "test/testdata/eval" $ do
32
34
doc <- openDoc "T1.hs" "haskell"
0 commit comments