aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/telnet_server.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-04-28 13:53:47 +0200
committerPeter Andersson <[email protected]>2015-05-04 12:33:44 +0200
commit46fd8b195b55af459c51253bcf5313ae71a40b71 (patch)
tree5fa0a2f79d42ae5b7d9fa0668bbb03512bdc78db /lib/common_test/test/telnet_server.erl
parentff1e0b2fe44a347670a5d72c45c061fefa6abc7f (diff)
downloadotp-46fd8b195b55af459c51253bcf5313ae71a40b71.tar.gz
otp-46fd8b195b55af459c51253bcf5313ae71a40b71.tar.bz2
otp-46fd8b195b55af459c51253bcf5313ae71a40b71.zip
Introduce wait_for_prompt option
OTP-12688
Diffstat (limited to 'lib/common_test/test/telnet_server.erl')
-rw-r--r--lib/common_test/test/telnet_server.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl
index 11959c3e12..2db5a9bc44 100644
--- a/lib/common_test/test/telnet_server.erl
+++ b/lib/common_test/test/telnet_server.erl
@@ -242,6 +242,12 @@ do_handle_data("echo_loop " ++ Data,State) ->
ReturnData = string:join(Lines,"\n"),
send_loop(list_to_integer(TStr),ReturnData,State),
{ok,State};
+do_handle_data("echo_delayed_prompt "++Data,State) ->
+ [MsStr|EchoData] = string:tokens(Data, " "),
+ send(string:join(EchoData,"\n"),State),
+ ct:sleep(list_to_integer(MsStr)),
+ send("\r\n> ",State),
+ {ok,State};
do_handle_data("disconnect_after " ++WaitStr,State) ->
Wait = list_to_integer(string:strip(WaitStr,right,$\n)),
dbg("Server will close connection in ~w ms...", [Wait]),