File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
plugins/hls-cabal-plugin/test Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,14 @@ pluginTests =
107107 length diags @?= 1
108108 unknownLicenseDiag ^. L. range @?= Range (Position 3 24 ) (Position 4 0 )
109109 unknownLicenseDiag ^. L. severity @?= Just DiagnosticSeverity_Error
110+ , runCabalTestCaseSession " Publishes Diagnostics on Error in the first line" " " $ do
111+ _ <- openDoc " unsupportedVersion.cabal" " cabal"
112+ diags <- cabalCaptureKick
113+ unknownVersionDiag <- liftIO $ inspectDiagnostic diags [" Unsupported cabal-version 99999.0" ]
114+ liftIO $ do
115+ length diags @?= 1
116+ unknownVersionDiag ^. L. range @?= Range (Position 0 0 ) (Position 1 0 )
117+ unknownVersionDiag ^. L. severity @?= Just DiagnosticSeverity_Error
110118 , runCabalTestCaseSession " Clears diagnostics" " " $ do
111119 doc <- openDoc " invalid.cabal" " cabal"
112120 diags <- cabalCaptureKick
Original file line number Diff line number Diff line change 1+ cabal-version : 99999.0
2+ name : invalid
3+ version : 0.1.0.0
You can’t perform that action at this time.
0 commit comments