Skip to content

Commit

Permalink
Try longer wait in Rust/Changes.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Apr 10, 2024
1 parent 7178232 commit 0d48922
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/app/Spec/Tests/Rust/Changes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ changesTests = describe "Changes" $ do
it [i|Simple change|] $ doSession' "main.ipynb" "rust-analyzer" [i|println("hi");|] $ \filename -> do
ident <- openDoc filename "haskell"

waitForDiagnostics >>= \diags -> do
assertDiagnosticRanges' (L.sortBy (compare `on` (^. LSP.message)) diags) [
(Range (Position 0 0) (Position 0 7), Just (InR "E0423"), "expected function, found macro `println`\nnot a function")
, (Range (Position 0 7) (Position 0 7), Just (InR "E0423"), "use `!` to invoke the macro: `!`")
]
waitUntil 120.0 $ do
waitForDiagnostics >>= \diags -> do
assertDiagnosticRanges' (L.sortBy (compare `on` (^. LSP.message)) diags) [
(Range (Position 0 0) (Position 0 7), Just (InR "E0423"), "expected function, found macro `println`\nnot a function")
, (Range (Position 0 7) (Position 0 7), Just (InR "E0423"), "use `!` to invoke the macro: `!`")
]

changeDoc ident [TextDocumentContentChangeEvent $ InL (#range .== (Range (p 0 7) (p 0 7)) .+ #rangeLength .== Nothing .+ #text .== "z")]

Expand Down

0 comments on commit 0d48922

Please sign in to comment.