File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import Test.Tasty
1313import Test.Tasty.ExpectedFailure (ignoreTestBecause )
1414import Test.Tasty.HUnit
1515import qualified Data.Text as T
16+ import Data.Default (def )
17+ import Ide.Plugin.Config (Config (maxCompletions ))
1618
1719tests :: TestTree
1820tests = testGroup " completions" [
@@ -221,6 +223,12 @@ tests = testGroup "completions" [
221223 liftIO $
222224 item ^. detail @?= Just " :: (a -> b -> c) -> b -> a -> c"
223225
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+
224232 , contextTests
225233 , snippetTests
226234 ]
You can’t perform that action at this time.
0 commit comments