From bf4035bb3f8ee7c4ff1130396f70e742e7776d31 Mon Sep 17 00:00:00 2001 From: Hakan Nilsson Date: Thu, 21 Dec 2023 10:05:10 +0100 Subject: [PATCH] Fix test --- apps/els_lsp/test/els_completion_SUITE.erl | 51 ++++++++-------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/apps/els_lsp/test/els_completion_SUITE.erl b/apps/els_lsp/test/els_completion_SUITE.erl index 78bf81273..a35cc5311 100644 --- a/apps/els_lsp/test/els_completion_SUITE.erl +++ b/apps/els_lsp/test/els_completion_SUITE.erl @@ -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 => <>, @@ -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.