diff options
author | Peter Andersson <[email protected]> | 2014-04-14 15:53:35 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2014-04-16 12:13:21 +0200 |
commit | 129370d9015831b7b5059686de39b25a5be5f502 (patch) | |
tree | 00f93eb1993b23b51c015c3f3409afb310f52748 /lib/common_test/test/telnet_server.erl | |
parent | b8494d9b7362f1edfb87f2dbd9f12e316ac71c1e (diff) | |
download | otp-129370d9015831b7b5059686de39b25a5be5f502.tar.gz otp-129370d9015831b7b5059686de39b25a5be5f502.tar.bz2 otp-129370d9015831b7b5059686de39b25a5be5f502.zip |
Fix problem with substring in large message getting incorrectly reversed
OTP-11871
Diffstat (limited to 'lib/common_test/test/telnet_server.erl')
-rw-r--r-- | lib/common_test/test/telnet_server.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl index ae56787819..1d341d6106 100644 --- a/lib/common_test/test/telnet_server.erl +++ b/lib/common_test/test/telnet_server.erl @@ -198,6 +198,14 @@ do_handle_data(Data,#state{authorized={user,_}}=State) -> do_handle_data("echo " ++ Data,State) -> send(Data++"\r\n> ",State), {ok,State}; +do_handle_data("echo_sep " ++ Data,State) -> + Msgs = string:tokens(Data," "), + lists:foreach(fun(Msg) -> + send(Msg,State), + timer:sleep(10) + end, Msgs), + send("\r\n> ",State), + {ok,State}; do_handle_data("echo_no_prompt " ++ Data,State) -> send(Data,State), {ok,State}; |