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/src | |
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/src')
-rw-r--r-- | lib/common_test/src/ct_telnet.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl index c9dc2338cd..44e910eb81 100644 --- a/lib/common_test/src/ct_telnet.erl +++ b/lib/common_test/src/ct_telnet.erl @@ -869,14 +869,13 @@ teln_cmd(Pid,Cmd,Prx,Timeout) -> teln_receive_until_prompt(Pid,Prx,Timeout). teln_get_all_data(Pid,Prx,Data,Acc,LastLine) -> - case check_for_prompt(Prx,lists:reverse(LastLine) ++ Data) of + case check_for_prompt(Prx,LastLine++Data) of {prompt,Lines,_PromptType,Rest} -> teln_get_all_data(Pid,Prx,Rest,[Lines|Acc],[]); {noprompt,Lines,LastLine1} -> case ct_telnet_client:get_data(Pid) of {ok,[]} -> - {ok,lists:reverse(lists:append([Lines|Acc])), - lists:reverse(LastLine1)}; + {ok,lists:reverse(lists:append([Lines|Acc])),LastLine1}; {ok,Data1} -> teln_get_all_data(Pid,Prx,Data1,[Lines|Acc],LastLine1) end @@ -1334,7 +1333,7 @@ teln_receive_until_prompt(Pid,Prx,Timeout) -> teln_receive_until_prompt(Pid,Prx,Acc,LastLine) -> {ok,Data} = ct_telnet_client:get_data(Pid), - case check_for_prompt(Prx,LastLine ++ Data) of + case check_for_prompt(Prx,LastLine++Data) of {prompt,Lines,PromptType,Rest} -> Return = lists:reverse(lists:append([Lines|Acc])), {ok,Return,PromptType,Rest}; |