diff options
author | Henrik Nord <[email protected]> | 2011-09-01 14:50:42 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-09-01 14:50:48 +0200 |
commit | ad0f1f1f7e18e98d772b6f76b7310a013b695c97 (patch) | |
tree | bd1e3fb2a7a8ccf908deabc5ed82e8f512ec9ea1 /lib/kernel/test/gen_udp_SUITE.erl | |
parent | dcc4df2464c9f8005c5d242505090cc88beb2eb5 (diff) | |
parent | af8938714416c0b1393a0830fdc6e8a5ab4be87c (diff) | |
download | otp-ad0f1f1f7e18e98d772b6f76b7310a013b695c97.tar.gz otp-ad0f1f1f7e18e98d772b6f76b7310a013b695c97.tar.bz2 otp-ad0f1f1f7e18e98d772b6f76b7310a013b695c97.zip |
Merge branch 'fm/gen_tcp_udp_doc_packet_type' into dev
* fm/gen_tcp_udp_doc_packet_type:
Fix type of Packet arg of gen_tcp:send/2 and gen_udp:send/4
OTP-9514
Diffstat (limited to 'lib/kernel/test/gen_udp_SUITE.erl')
-rw-r--r-- | lib/kernel/test/gen_udp_SUITE.erl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl index b734d7fd98..514deaf065 100644 --- a/lib/kernel/test/gen_udp_SUITE.erl +++ b/lib/kernel/test/gen_udp_SUITE.erl @@ -201,13 +201,21 @@ binary_passive_recv(suite) -> binary_passive_recv(doc) -> ["OTP-3823 gen_udp:recv does not return address in binary mode"]; binary_passive_recv(Config) when is_list(Config) -> - ?line D = "The quick brown fox jumps over a lazy dog", - ?line B = list_to_binary(D), + ?line D1 = "The quick brown fox jumps over a lazy dog", + ?line D2 = list_to_binary(D1), + ?line D3 = ["The quick", <<" brown ">>, "fox jumps ", <<"over ">>, + <<>>, $a, [[], " lazy ", <<"dog">>]], + ?line D2 = iolist_to_binary(D3), + ?line B = D2, ?line {ok, R} = gen_udp:open(0, [binary, {active, false}]), ?line {ok, RP} = inet:port(R), ?line {ok, S} = gen_udp:open(0), ?line {ok, SP} = inet:port(S), - ?line ok = gen_udp:send(S, localhost, RP, D), + ?line ok = gen_udp:send(S, localhost, RP, D1), + ?line {ok, {{127, 0, 0, 1}, SP, B}} = gen_udp:recv(R, byte_size(B)+1), + ?line ok = gen_udp:send(S, localhost, RP, D2), + ?line {ok, {{127, 0, 0, 1}, SP, B}} = gen_udp:recv(R, byte_size(B)+1), + ?line ok = gen_udp:send(S, localhost, RP, D3), ?line {ok, {{127, 0, 0, 1}, SP, B}} = gen_udp:recv(R, byte_size(B)+1), ?line ok = gen_udp:close(S), ?line ok = gen_udp:close(R), |