diff options
author | Siri Hansen <[email protected]> | 2014-11-11 14:35:09 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-11-11 14:35:09 +0100 |
commit | b3741f2b8e2ed9f370abb029160d1817497436e1 (patch) | |
tree | 128289e4f6c65b4edebdb17fcd3ff2d36be39fae /lib/common_test/src/ct_telnet_client.erl | |
parent | 8a120f6b7c97c64917e11fac3f6c21507ad374c3 (diff) | |
parent | 9a5b4e9b2a2a622e67fb55ab4262eb858dd46e54 (diff) | |
download | otp-b3741f2b8e2ed9f370abb029160d1817497436e1.tar.gz otp-b3741f2b8e2ed9f370abb029160d1817497436e1.tar.bz2 otp-b3741f2b8e2ed9f370abb029160d1817497436e1.zip |
Merge branch 'siri/ct_telnet/no-newline/OTP-12252' into maint
* siri/ct_telnet/no-newline/OTP-12252:
[ct] Add 'newline' option to send functions in ct_telnet
Diffstat (limited to 'lib/common_test/src/ct_telnet_client.erl')
-rw-r--r-- | lib/common_test/src/ct_telnet_client.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_telnet_client.erl b/lib/common_test/src/ct_telnet_client.erl index ce30dcb74b..3ae373e433 100644 --- a/lib/common_test/src/ct_telnet_client.erl +++ b/lib/common_test/src/ct_telnet_client.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2013. All Rights Reserved. +%% Copyright Ericsson AB 2003-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -35,7 +35,7 @@ %% -define(debug, true). -export([open/2, open/3, open/4, open/5, close/1]). --export([send_data/2, get_data/1]). +-export([send_data/2, send_data/3, get_data/1]). -define(TELNET_PORT, 23). -define(OPEN_TIMEOUT,10000). @@ -97,7 +97,11 @@ close(Pid) -> end. send_data(Pid, Data) -> - Pid ! {send_data, Data++"\n"}, + send_data(Pid, Data, true). +send_data(Pid, Data, true) -> + send_data(Pid, Data++"\n", false); +send_data(Pid, Data, false) -> + Pid ! {send_data, Data}, ok. get_data(Pid) -> |