Skip to content

Commit

Permalink
make the sample more broken
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Nov 28, 2023
1 parent 057393d commit adb4f79
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions apps/language_server/test/providers/document_symbols_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2458,45 +2458,14 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbolsTest do
uri = "file:///project/test.exs"

text = """
defmodule A do
defmodule aA do
def hello do
Hello.hi(
end
end
"""

assert {
:ok,
[
%ElixirLS.LanguageServer.Protocol.DocumentSymbol{
name: "A",
kind: 2,
range: %{
"end" => %{"character" => 0, "line" => 5},
"start" => %{"character" => 0, "line" => 0}
},
selectionRange: %{
"end" => %{"character" => 11, "line" => 0},
"start" => %{"character" => 10, "line" => 0}
},
children: [
%ElixirLS.LanguageServer.Protocol.DocumentSymbol{
name: "def hello",
kind: 12,
range: %{
"end" => %{"character" => 3, "line" => 4},
"start" => %{"character" => 2, "line" => 1}
},
selectionRange: %{
"end" => %{"character" => 11, "line" => 1},
"start" => %{"character" => 6, "line" => 1}
},
children: []
}
]
}
]
} = DocumentSymbols.symbols(uri, text, true)
assert {:error, :server_error, "Cannot parse source file", false} = DocumentSymbols.symbols(uri, text, true)
end

test "returns def and defp as a prefix" do
Expand Down

0 comments on commit adb4f79

Please sign in to comment.