aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-05-20 10:37:50 +0200
committerHans Nilsson <[email protected]>2016-05-20 10:37:50 +0200
commit221055de07c793f2e037816ad3e2c336b1b2dd92 (patch)
tree13e52284569d678b907166cb0ba206681ab0e9ec /lib
parent537cfadcead996010d848c0f3d8dda147f2a78c3 (diff)
downloadotp-221055de07c793f2e037816ad3e2c336b1b2dd92.tar.gz
otp-221055de07c793f2e037816ad3e2c336b1b2dd92.tar.bz2
otp-221055de07c793f2e037816ad3e2c336b1b2dd92.zip
ssh: split result line in test
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/test/ssh_algorithms_SUITE.erl14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl
index 826555f6ab..95fe23a461 100644
--- a/lib/ssh/test/ssh_algorithms_SUITE.erl
+++ b/lib/ssh/test/ssh_algorithms_SUITE.erl
@@ -259,15 +259,17 @@ sshc_simple_exec_os_cmd(Config) ->
" ",Host," 1+1."]),
Result = os:cmd(Cmd),
ct:log("~p~n = ~p",[Cmd, Result]),
- Parent ! {result, self(), Result, "2\n"}
+ Parent ! {result, self(), Result, "2"}
end),
receive
- {result, Client, Result, Expect} ->
- case Result of
- Expect ->
+ {result, Client, RawResult, Expect} ->
+ Lines = string:tokens(RawResult, "\r\n"),
+ case lists:any(fun(Line) -> Line==Expect end,
+ Lines) of
+ true ->
ok;
- _ ->
- ct:log("Bad result: ~p~nExpected: ~p", [Result,Expect]),
+ false ->
+ ct:log("Bad result: ~p~nExpected: ~p~nMangled result: ~p", [RawResult,Expect,Lines]),
{fail, "Bad result"}
end
after ?TIMEOUT ->