@@ -342,7 +342,13 @@ defmodule IEx.HelpersTest do
342342 test "prints Erlang module function specs" do
343343 captured = capture_io ( fn -> h ( :timer . sleep ( ) / 1 ) end )
344344 assert captured =~ ":timer.sleep/1"
345- assert captured =~ "-spec sleep(Time) -> ok when Time :: timeout()."
345+
346+ # TODO Fix for OTP 27 once specs are available
347+ if System . otp_release ( ) < "27" do
348+ assert captured =~ "-spec sleep(Time) -> ok when Time :: timeout()."
349+ else
350+ assert captured =~ "sleep(Time)"
351+ end
346352 end
347353
348354 @ tag :erlang_doc
@@ -1014,18 +1020,39 @@ defmodule IEx.HelpersTest do
10141020 @ tag :erlang_doc
10151021 test "prints all types in Erlang module" do
10161022 captured = capture_io ( fn -> t ( :queue ) end )
1017- assert captured =~ "-type queue() :: queue(_)"
1018- assert captured =~ "-opaque queue(Item)"
1023+
1024+ # TODO Fix for OTP 27 once specs are available
1025+ if System . otp_release ( ) < "27" do
1026+ assert captured =~ "-type queue() :: queue(_)"
1027+ assert captured =~ "-opaque queue(Item)"
1028+ else
1029+ assert captured =~ "queue()"
1030+ assert captured =~ "queue(Item)"
1031+ end
10191032 end
10201033
10211034 @ tag :erlang_doc
10221035 test "prints single type from Erlang module" do
10231036 captured = capture_io ( fn -> t ( :erlang . iovec ( ) ) end )
1024- assert captured =~ "-type iovec() :: [binary()]"
1037+
1038+ # TODO Fix for OTP 27 once specs are available
1039+ if System . otp_release ( ) < "27" do
1040+ assert captured =~ "-type iovec() :: [binary()]"
1041+ else
1042+ assert captured =~ "iovec()"
1043+ end
1044+
10251045 assert captured =~ "A list of binaries."
10261046
10271047 captured = capture_io ( fn -> t ( :erlang . iovec ( ) / 0 ) end )
1028- assert captured =~ "-type iovec() :: [binary()]"
1048+
1049+ # TODO Fix for OTP 27 once specs are available
1050+ if System . otp_release ( ) < "27" do
1051+ assert captured =~ "-type iovec() :: [binary()]"
1052+ else
1053+ assert captured =~ "iovec()"
1054+ end
1055+
10291056 assert captured =~ "A list of binaries."
10301057 end
10311058
0 commit comments