Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
plux committed Dec 21, 2023
1 parent 0c9c03e commit bf4035b
Showing 1 changed file with 19 additions and 32 deletions.
51 changes: 19 additions & 32 deletions apps/els_lsp/test/els_completion_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,25 @@ exported_functions_arity(Config) ->
exported_types(Config) ->
TriggerKind = ?COMPLETION_TRIGGER_KIND_CHARACTER,
Uri = ?config(code_navigation_uri, Config),
Types = file_exported_types(),

OtpRelease = list_to_integer(erlang:system_info(otp_release)),

Types =
[
<<"date_time">>,
<<"fd">>,
<<"file_info">>,
<<"filename">>,
<<"filename_all">>,
<<"io_device">>
] ++
[<<"location">> || OtpRelease >= 26] ++
[
<<"mode">>,
<<"name">>,
<<"name_all">>,
<<"posix">>
],
Expected = [
#{
insertText => <<T/binary, "()">>,
Expand Down Expand Up @@ -1993,34 +2011,3 @@ has_eep48(Module) ->

keywords() ->
els_completion_provider:keywords(test, test).

-if(OTP_RELEASE >= 26).
file_exported_types() ->
[
<<"date_time">>,
<<"fd">>,
<<"file_info">>,
<<"filename">>,
<<"filename_all">>,
<<"io_device">>,
<<"location">>,
<<"mode">>,
<<"name">>,
<<"name_all">>,
<<"posix">>
].
-else.
file_exported_types() ->
[
<<"date_time">>,
<<"fd">>,
<<"file_info">>,
<<"filename">>,
<<"filename_all">>,
<<"io_device">>,
<<"mode">>,
<<"name">>,
<<"name_all">>,
<<"posix">>
].
-endif.

0 comments on commit bf4035b

Please sign in to comment.