Skip to content

Commit

Permalink
add back some tests and investigate haskell#2375 later
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiemundo committed Nov 29, 2021
1 parent 4475e77 commit 21c55c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ completion _ide _ complParams = do
let (J.TextDocumentIdentifier uri) = complParams ^. J.textDocument
position = complParams ^. J.position
contents <- LSP.getVirtualFile $ toNormalizedUri uri
fmap (Right . J.InL) $ case (undefined, uriToFilePath' undefined) of
fmap (Right . J.InL) $ case (contents, uriToFilePath' uri) of
(Just cnts, Just _path) ->
result <$> VFS.getCompletionPrefix position cnts
where
Expand Down
5 changes: 2 additions & 3 deletions plugins/hls-pragmas-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ tests :: TestTree
tests =
testGroup "pragmas"
[ codeActionTests
-- , codeActionTests'
-- , completionTests
, codeActionTests'
, completionTests
]

codeActionTests :: TestTree
Expand Down Expand Up @@ -125,7 +125,6 @@ completionTest testComment fileName te' label textFormat insertText detail [a, b
item ^. L.insertTextFormat @?= textFormat
item ^. L.insertText @?= insertText
item ^. L.detail @?= detail
completionTest _ _ _ _ _ _ _ _ = undefined

goldenWithPragmas :: TestName -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree
goldenWithPragmas title path = goldenWithHaskellDoc pragmasPlugin title testDataDir path "expected" "hs"
Expand Down

0 comments on commit 21c55c9

Please sign in to comment.