Skip to content

Commit 6ef94c5

Browse files
committed
Move exclude tag to test helper
1 parent 602096f commit 6ef94c5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/elixir/test/elixir/macro_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ defmodule MacroTest do
147147
end
148148
end
149149

150-
@tag skip: not function_exported?(:re, :import, 1)
150+
@tag :re_import
151151
test "escape regex will remove references and replace it by a call to :re.import/1" do
152152
assert {
153153
:%{},

lib/elixir/test/elixir/test_helper.exs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,20 @@ cover_exclude =
132132
[]
133133
end
134134

135+
# OTP 28.1+
136+
re_import_exclude =
137+
if Code.ensure_loaded?(:re) and function_exported?(:re, :import, 1) do
138+
[]
139+
else
140+
[:re_import]
141+
end
142+
135143
ExUnit.start(
136144
trace: !!System.get_env("TRACE"),
137145
exclude:
138146
epmd_exclude ++
139-
os_exclude ++ line_exclude ++ distributed_exclude ++ source_exclude ++ cover_exclude,
147+
os_exclude ++
148+
line_exclude ++ distributed_exclude ++ source_exclude ++ cover_exclude ++ re_import_exclude,
140149
include: line_include,
141150
assert_receive_timeout: String.to_integer(System.get_env("ELIXIR_ASSERT_TIMEOUT", "300"))
142151
)

0 commit comments

Comments
 (0)