Skip to content

Commit

Permalink
Fix console prompt for OTP26
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsumner committed May 22, 2024
1 parent 77d0fb6 commit 24d826e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/basic_command_line.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
-compile([export_all, nowarn_export_all]).
-export([confirm/0]).

-if(?OTP_RELEASE >= 26).
-define(CONSOLE_PROMPT, "(press Ctrl+G to abort, type help(). for help)").
-else.
-define(CONSOLE_PROMPT, "\(abort with ^G\)").
-endif.

confirm() ->

Expand Down Expand Up @@ -62,7 +67,7 @@ console_test(Node) ->
lager:info("Testing riak console on ~s", [Node]),

%% Stop node, to test console working
rt:console(Node, [{expect, "\(abort with ^G\)"},
rt:console(Node, [{expect, ?CONSOLE_PROMPT},
{send, "riak_core_ring_manager:get_my_ring()."},
{expect, "dict,"},
{send, "q()."},
Expand Down Expand Up @@ -164,3 +169,4 @@ getpid_down_test(Node) ->
{ok, PidOut} = rt:riak(Node, ["pid"]),
?assert(rt:str(PidOut, "not responding to pings")),
ok.

0 comments on commit 24d826e

Please sign in to comment.