Skip to content

Commit d66600f

Browse files
committed
fix tests on OTP < 27
1 parent 90dd561 commit d66600f

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

apps/language_server/test/markdown_utils_test.exs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -294,19 +294,21 @@ defmodule ElixirLS.LanguageServer.MarkdownUtilsTest do
294294
) == "[Up and running](http://example.com/foo.md)"
295295
end
296296

297-
test "erlang extra page" do
298-
assert MarkdownUtils.transform_ex_doc_links(
299-
"[Up and running](e:erts_alloc.md)",
300-
:erlang
301-
) == "[Up and running](https://www.erlang.org/doc/apps/erts/erts_alloc.html)"
302-
end
297+
if System.otp_release() |> String.to_integer() >= 27 do
298+
test "erlang extra page" do
299+
assert MarkdownUtils.transform_ex_doc_links(
300+
"[Up and running](e:erts_alloc.md)",
301+
:erlang
302+
) == "[Up and running](https://www.erlang.org/doc/apps/erts/erts_alloc.html)"
303+
end
303304

304-
test "erlang extra page with app" do
305-
assert MarkdownUtils.transform_ex_doc_links(
306-
"[Up and running](e:system:expressions.md#term-comparisons)",
307-
:lists
308-
) ==
309-
"[Up and running](https://www.erlang.org/doc/system/expressions.html#term-comparisons)"
305+
test "erlang extra page with app" do
306+
assert MarkdownUtils.transform_ex_doc_links(
307+
"[Up and running](e:system:expressions.md#term-comparisons)",
308+
:lists
309+
) ==
310+
"[Up and running](https://www.erlang.org/doc/system/expressions.html#term-comparisons)"
311+
end
310312
end
311313

312314
test "expression" do

apps/language_server/test/providers/completion/suggestions_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4243,7 +4243,7 @@ defmodule ElixirLS.LanguageServer.Providers.Completion.SuggestionTest do
42434243
if System.otp_release() |> String.to_integer() >= 27 do
42444244
assert "The time unit used" <> _ = summary
42454245
else
4246-
assert "Supported time unit representations:" <> _ = summary
4246+
assert summary =~ "Supported time unit representations:"
42474247
end
42484248
end
42494249
end

apps/language_server/test/providers/signature_help/signature_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ defmodule ElixirLS.LanguageServer.Providers.SignatureHelp.SignatureTest do
247247
if System.otp_release() |> String.to_integer() >= 27 do
248248
assert "The time unit" <> _ = summary
249249
else
250-
assert "Supported time unit representations" <> _ = summary
250+
assert summary =~ "Supported time unit representations"
251251
end
252252
end
253253
end

0 commit comments

Comments
 (0)