Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 664931b

Browse files
jian-linfendor
authored andcommitted
Remove "Diagnostics in .hs files from invalid .cabal file" cabal test
This test has a race condition. See here[1] for more info. [1]: #4576 (comment)
1 parent a4e4d8c commit 664931b

File tree

1 file changed

+0
-23
lines changed
  • plugins/hls-cabal-plugin/test

1 file changed

+0
-23
lines changed

‎plugins/hls-cabal-plugin/test/Main.hs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -131,29 +131,6 @@ pluginTests =
131131
expectNoMoreDiagnostics 1 hsDoc "typechecking"
132132
cabalDoc <- openDoc "simple-cabal.cabal" "cabal"
133133
expectNoMoreDiagnostics 1 cabalDoc "parsing"
134-
, runCabalTestCaseSession "Diagnostics in .hs files from invalid .cabal file" "simple-cabal" $ do
135-
hsDoc <- openDoc "A.hs" "haskell"
136-
expectNoMoreDiagnostics 1 hsDoc "typechecking"
137-
cabalDoc <- openDoc "simple-cabal.cabal" "cabal"
138-
expectNoMoreDiagnostics 1 cabalDoc "parsing"
139-
let theRange = Range (Position 3 20) (Position 3 23)
140-
-- Invalid license
141-
changeDoc
142-
cabalDoc
143-
[ TextDocumentContentChangeEvent $
144-
InL TextDocumentContentChangePartial
145-
{ _range = theRange
146-
, _rangeLength = Nothing
147-
, _text = "MIT3"
148-
}
149-
]
150-
cabalDiags <- waitForDiagnosticsFrom cabalDoc
151-
unknownLicenseDiag <- liftIO $ inspectDiagnostic cabalDiags ["Unknown SPDX license identifier: 'MIT3'"]
152-
expectNoMoreDiagnostics 1 hsDoc "typechecking"
153-
liftIO $ do
154-
length cabalDiags @?= 1
155-
unknownLicenseDiag ^. L.range @?= Range (Position 3 24) (Position 4 0)
156-
unknownLicenseDiag ^. L.severity @?= Just DiagnosticSeverity_Error
157134
]
158135
]
159136
-- ----------------------------------------------------------------------------

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /