aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_trpt_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-11-04 10:40:21 +0100
committerHans Nilsson <[email protected]>2015-11-04 10:40:21 +0100
commit4f085471fc4e1886bd7549cf135e7038a87e6a8e (patch)
tree749d5796248b5eb08cbb74d1a413ff79ca1843f4 /lib/ssh/test/ssh_trpt_test_lib.erl
parent82393fda2f44841663b23c95879212f339a56474 (diff)
parenta541756c4ab173a63969f1789f82b56d22b00fa2 (diff)
downloadotp-4f085471fc4e1886bd7549cf135e7038a87e6a8e.tar.gz
otp-4f085471fc4e1886bd7549cf135e7038a87e6a8e.tar.bz2
otp-4f085471fc4e1886bd7549cf135e7038a87e6a8e.zip
Merge branch 'hans/ssh/bad_lengths_tests/OTP-12792' into maint
Diffstat (limited to 'lib/ssh/test/ssh_trpt_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_trpt_test_lib.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ssh/test/ssh_trpt_test_lib.erl b/lib/ssh/test/ssh_trpt_test_lib.erl
index 5080b33249..4269529ae8 100644
--- a/lib/ssh/test/ssh_trpt_test_lib.erl
+++ b/lib/ssh/test/ssh_trpt_test_lib.erl
@@ -386,7 +386,14 @@ send(S0, Line) when is_binary(Line) ->
fun(X) when X==true;X==detail -> {"Send line~n~p~n",[Line]} end),
send_bytes(Line, S#s{return_value = Line});
-%%% Msg = #ssh_msg_*{}
+send(S0, {special,Msg,PacketFun}) when is_tuple(Msg),
+ is_function(PacketFun,2) ->
+ S = opt(print_messages, S0,
+ fun(X) when X==true;X==detail -> {"Send~n~s~n",[format_msg(Msg)]} end),
+ {Packet, C} = PacketFun(Msg, S#s.ssh),
+ send_bytes(Packet, S#s{ssh = C, %%inc_send_seq_num(C),
+ return_value = Msg});
+
send(S0, Msg) when is_tuple(Msg) ->
S = opt(print_messages, S0,
fun(X) when X==true;X==detail -> {"Send~n~s~n",[format_msg(Msg)]} end),