File tree 2 files changed +11
-0
lines changed
plugins/hls-cabal-plugin/test
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,14 @@ pluginTests =
107
107
length diags @?= 1
108
108
unknownLicenseDiag ^. L. range @?= Range (Position 3 24 ) (Position 4 0 )
109
109
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
110
118
, runCabalTestCaseSession " Clears diagnostics" " " $ do
111
119
doc <- openDoc " invalid.cabal" " cabal"
112
120
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