File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -96,31 +96,21 @@ hlintTests = testGroup "hlint suggestions" [
96
96
97
97
liftIO $ Just " hlint" `notElem` map (^. L. source) diags' @? " There are no hlint diagnostics"
98
98
99
- , testCase " changing document contents updates hlint diagnostics " $ runSession hlsCommand fullCaps " test/testdata/hlint" $ do
100
- doc <- openDoc " ApplyRefact2 .hs" " haskell"
99
+ , testCase " apply hints works with LambdaCase " $ runSession hlsCommand fullCaps " test/testdata/hlint" $ do
100
+ doc <- openDoc " ApplyRefact1 .hs" " haskell"
101
101
diags <- waitForDiagnosticsSource " hlint"
102
102
103
- liftIO $ length diags @?= 2 -- "Eta Reduce" and "Redundant Id"
103
+ liftIO $ length diags @?= 1
104
104
105
105
let change = TextDocumentContentChangeEvent
106
- (Just (Range (Position 1 8 ) (Position 1 12 )))
107
- Nothing " x "
106
+ (Just (Range (Position 3 21 ) (Position 3 27 )))
107
+ Nothing " True "
108
108
109
109
changeDoc doc [change]
110
110
111
111
diags' <- waitForDiagnostics
112
112
113
113
liftIO $ (not $ Just " hlint" `elem` map (^. L. source) diags') @? " There are no hlint diagnostics"
114
-
115
- let change' = TextDocumentContentChangeEvent
116
- (Just (Range (Position 1 8 ) (Position 1 12 )))
117
- Nothing " id x"
118
-
119
- changeDoc doc [change']
120
-
121
- diags'' <- waitForDiagnosticsFromSource doc " hlint"
122
-
123
- liftIO $ length diags'' @?= 2
124
114
]
125
115
126
116
renameTests :: TestTree
Original file line number Diff line number Diff line change 1
1
cradle :
2
2
direct :
3
3
arguments :
4
+ - -XLambdaCase
4
5
- " ApplyRefact2"
You can’t perform that action at this time.
0 commit comments