Skip to content

Commit

Permalink
Test for issue haskell/ghcide#7 (haskell/ghcide#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacg authored and cocreature committed Dec 17, 2019
1 parent fe192bd commit 35f3c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ghcide/test/data/GotoHover.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ listCompBind = [ succ c | c <- "abc" ]
multipleClause :: Bool -> Char
multipleClause True = 't'
multipleClause False = 'f'

-- | Recognizable docs: kpqz
documented = True
4 changes: 3 additions & 1 deletion ghcide/test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ findDefinitionAndHoverTests = let
lclL33 = Position 33 22
mclL36 = Position 36 1 ; mcl = [mkR 36 0 36 14]
mclL37 = Position 37 1
docL40 = Position 40 1 ; doc = [ExpectHoverText ["Recognizable docs: kpqz"]]
in
mkFindTests
-- def hover look expect
Expand All @@ -868,11 +869,12 @@ findDefinitionAndHoverTests = let
, test yes yes lclL33 lcb "listcomp lookup"
, test yes yes mclL36 mcl "top-level fn 1st clause"
, test yes yes mclL37 mcl "top-level fn 2nd clause #246"
, test no broken docL40 doc "documentation"
]
where yes, broken :: (TestTree -> Maybe TestTree)
yes = Just -- test should run and pass
broken = Just . (`xfail` "known broken")
-- no = const Nothing -- don't run this test at all
no = const Nothing -- don't run this test at all

pluginTests :: TestTree
pluginTests = testSessionWait "plugins" $ do
Expand Down

0 comments on commit 35f3c37

Please sign in to comment.