Skip to content

Commit

Permalink
Fix editor test
Browse files Browse the repository at this point in the history
  • Loading branch information
abonie committed Feb 10, 2023
1 parent 7ad8424 commit e2fdfad
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/service/EditorTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,16 @@ let _ = printf " %*a" 3 (fun _ _ -> ()) 2
let file = "/home/user/Test.fsx"
let parseResult, typeCheckResults = parseAndCheckScript(file, input)

typeCheckResults.Diagnostics |> shouldEqual [||]
typeCheckResults.Diagnostics.Length |> shouldEqual 5
typeCheckResults.Diagnostics
|> Array.map (fun d -> d.ErrorNumber, d.StartLine, d.StartColumn, d.EndLine, d.EndColumn, d.Message)
|> shouldEqual
[| (3376, 23, 16, 23, 22, "Bad format specifier: '%'")
(3376, 24, 16, 24, 24, "Bad format specifier: '%'")
(3376, 25, 16, 25, 26, "Bad format specifier: '%'")
(3376, 27, 16, 27, 28, "Bad format specifier: '%'")
(3376, 32, 16, 32, 33, "Bad format specifier: '%'") |]

typeCheckResults.GetFormatSpecifierLocationsAndArity()
|> Array.map (fun (range,numArgs) -> range.StartLine, range.StartColumn, range.EndLine, range.EndColumn, numArgs)
|> shouldEqual
Expand Down

0 comments on commit e2fdfad

Please sign in to comment.