File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
tests/FSharpLint.Client.Tests Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -117,3 +117,17 @@ let ``Daemon can lint a file with success``() =
117117 | LintResult warnings ->
118118 Assert.IsNotEmpty warnings
119119 Assert.AreEqual( LanguagePrimitives.EnumToValue FSharpLintResponseCode.OkLint, versionResponse.Code)
120+
121+ [<Test>]
122+ let ``LintError if Daemon lint an unparsable file`` () =
123+ using ( new ToolLocationOverride( ToolStatus.Available)) <| fun _ ->
124+
125+ let testHintsFile = basePath </> " tests" </> " FSharpLint.Client.Tests" </> " UnparsableFile.fs"
126+ let fsharpLintService : FSharpLintService = new LSPFSharpLintService() :> FSharpLintService
127+ let versionResponse = runLintFileCall testHintsFile fsharpLintService
128+
129+ match versionResponse.Result with
130+ | Content result -> Assert.Fail( " Should be a lint result" )
131+ | LintResult warnings ->
132+ Assert.AreEqual( LanguagePrimitives.EnumToValue FSharpLintResponseCode.OkLintError, versionResponse.Code)
133+ Assert.IsEmpty warnings
Original file line number Diff line number Diff line change 1+ module Test
2+
3+ # Hello word
4+
5+ ## I'm a markdown ( probably ?)
6+ let test = System.IO.Fi le
You can’t perform that action at this time.
0 commit comments