diff options
author | Hans Nilsson <[email protected]> | 2016-10-18 11:06:41 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-10-18 11:06:41 +0200 |
commit | 1550204bed17ecdcc59a53332bcdfa2ba246944a (patch) | |
tree | de6657101f4ef38f31ea5c7639e6b05516f89380 /lib/ssh/test/ssh_test_lib.erl | |
parent | a6d14916e17dfff43277a0d7f160e1c46b67daa0 (diff) | |
parent | 926391fbb8761d5833b3a6f5c9e523fcda373c6d (diff) | |
download | otp-1550204bed17ecdcc59a53332bcdfa2ba246944a.tar.gz otp-1550204bed17ecdcc59a53332bcdfa2ba246944a.tar.bz2 otp-1550204bed17ecdcc59a53332bcdfa2ba246944a.zip |
Merge branch 'maint-19' into maint
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index c43c6519f9..6fd401d182 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -208,6 +208,16 @@ reply(TestCase, Result) -> rcv_expected(Expect, SshPort, Timeout) -> receive + {SshPort, Recvd} when is_function(Expect) -> + case Expect(Recvd) of + true -> + ct:log("Got expected ~p from ~p",[Recvd,SshPort]), + catch port_close(SshPort), + rcv_lingering(50); + false -> + ct:log("Got UNEXPECTED ~p~n",[Recvd]), + rcv_expected(Expect, SshPort, Timeout) + end; {SshPort, Expect} -> ct:log("Got expected ~p from ~p",[Expect,SshPort]), catch port_close(SshPort), |