Skip to content

Commit

Permalink
make tests pass on 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Dec 29, 2023
1 parent 6e775f3 commit 4edc564
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
include:
- elixir: 1.12.x
otp: 22.x
tests_may_fail: true
tests_may_fail: false
- elixir: 1.12.x
otp: 23.x
tests_may_fail: true
tests_may_fail: false
- elixir: 1.12.x
otp: 24.x
tests_may_fail: true
tests_may_fail: false
- elixir: 1.13.x
otp: 22.x
tests_may_fail: false
Expand Down Expand Up @@ -80,6 +80,12 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.12.x
otp: 22.x
- elixir: 1.12.x
otp: 23.x
- elixir: 1.12.x
otp: 24.x
- elixir: 1.13.x
otp: 22.x
- elixir: 1.13.x
Expand Down
20 changes: 14 additions & 6 deletions apps/language_server/test/providers/references_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,13 @@ defmodule ElixirLS.LanguageServer.Providers.ReferencesTest do

list = References.references(parser_context, uri, line, char, true, File.cwd!())

assert length(list) == 2
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_erlang.ex")))
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_referenced.ex")))
if Version.match?(System.version(), ">= 1.13.0-dev") do
assert length(list) == 2
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_erlang.ex")))
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_referenced.ex")))
else
assert length(list) == 3
end
end

test "finds remote references to erlang module" do
Expand All @@ -239,9 +243,13 @@ defmodule ElixirLS.LanguageServer.Providers.ReferencesTest do

list = References.references(parser_context, uri, line, char, true, File.cwd!())

assert length(list) == 2
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_erlang.ex")))
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_referenced.ex")))
if Version.match?(System.version(), ">= 1.13.0-dev") do
assert length(list) == 2
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_erlang.ex")))
assert Enum.any?(list, &(&1["uri"] |> String.ends_with?("references_referenced.ex")))
else
assert length(list) == 3
end
end

test "finds alias references" do
Expand Down

0 comments on commit 4edc564

Please sign in to comment.