Skip to content

Commit

Permalink
exclude some tests on 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed May 4, 2024
1 parent 1525d4e commit abdf363
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,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 @@ -87,15 +87,15 @@ jobs:
fail-fast: false
matrix:
include:
# - elixir: 1.12.x
# otp: 22.x
# tests_may_fail: true
# - elixir: 1.12.x
# otp: 23.x
# tests_may_fail: true
# - elixir: 1.12.x
# otp: 24.x
# tests_may_fail: true
- elixir: 1.12.x
otp: 22.x
tests_may_fail: false
- elixir: 1.12.x
otp: 23.x
tests_may_fail: false
- elixir: 1.12.x
otp: 24.x
tests_may_fail: false
- elixir: 1.13.x
otp: 22.x
tests_may_fail: false
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.15.x
- elixir: 1.16.x
otp: 26.x
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 12 additions & 4 deletions test/elixir_sense/core/macro_expander_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ defmodule ElixirSense.Core.MacroExpanderTest do
|> MacroExpander.add_default_meta()
|> MacroExpander.expand_use(MyModule, [], line: 2, column: 1)

assert Macro.to_string(expanded) =~ "defmacro required(var)"
if Version.match?(System.version(), ">= 1.13.0") do
assert Macro.to_string(expanded) =~ "defmacro required(var)"
end
end

test "expand use with alias" do
Expand All @@ -33,7 +35,9 @@ defmodule ElixirSense.Core.MacroExpanderTest do
column: 1
)

assert Macro.to_string(expanded) =~ "defmacro required(var)"
if Version.match?(System.version(), ">= 1.13.0") do
assert Macro.to_string(expanded) =~ "defmacro required(var)"
end
end

test "expand use calling use" do
Expand All @@ -47,7 +51,9 @@ defmodule ElixirSense.Core.MacroExpanderTest do
|> MacroExpander.add_default_meta()
|> MacroExpander.expand_use(MyModule, [], line: 2, column: 1)

assert Macro.to_string(expanded) =~ "defmacro bar(var)"
if Version.match?(System.version(), ">= 1.13.0") do
assert Macro.to_string(expanded) =~ "defmacro bar(var)"
end
end

test "expand use when module does not define __using__ macro" do
Expand All @@ -61,6 +67,8 @@ defmodule ElixirSense.Core.MacroExpanderTest do
|> MacroExpander.add_default_meta()
|> MacroExpander.expand_use(MyModule, [], line: 2, column: 1)

assert Macro.to_string(expanded) =~ "require ElixirSenseExample.OverridableBehaviour"
if Version.match?(System.version(), ">= 1.13.0") do
assert Macro.to_string(expanded) =~ "require ElixirSenseExample.OverridableBehaviour"
end
end
end

0 comments on commit abdf363

Please sign in to comment.