We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c7cba2 commit 2b6230eCopy full SHA for 2b6230e
test/functional/Completion.hs
@@ -13,6 +13,8 @@ import Test.Tasty
13
import Test.Tasty.ExpectedFailure (ignoreTestBecause)
14
import Test.Tasty.HUnit
15
import qualified Data.Text as T
16
+import Data.Default (def)
17
+import Ide.Plugin.Config (Config (maxCompletions))
18
19
tests :: TestTree
20
tests = testGroup "completions" [
@@ -221,6 +223,12 @@ tests = testGroup "completions" [
221
223
liftIO $
222
224
item ^. detail @?= Just ":: (a -> b -> c) -> b -> a -> c"
225
226
+ , testCase "maxCompletions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
227
+ doc <- openDoc "Completion.hs" "haskell"
228
+
229
+ compls <- getCompletions doc (Position 5 7)
230
+ liftIO $ length compls @?= maxCompletions def
231
232
, contextTests
233
, snippetTests
234
]
0 commit comments