2 %% Example eunit test case.
3 %% http://svn.process-one.net/contribs/trunk/eunit/doc/overview-summary.html
6 %% http://www.irchelp.org/irchelp/rfc/rfc.html
7 %% An IRC (Internet Relay Chat) message is composed of
8 %% fields delimited by a space, up to an optional last
9 %% argument which may include spaces
10 -module(test_shutdown_server
).
11 -export([run_tests
/0]).
12 -include_lib("eunit/include/eunit.hrl").
17 case gen_tcp:recv(Sock
, 0) of
19 do_recv(Sock
, [Bs
, B
]);
21 {ok
, list_to_binary(Bs
)}
24 simple_server_test_() ->
25 SomeHostInNet
= "127.0.0.1",
26 {ok
, Sock
} = gen_tcp:connect(SomeHostInNet
, 9003,
27 [binary, {packet
, 0}]),
28 ok
= gen_tcp:send(Sock
, "sysquit\r\n"),
33 eunit:test(test_shutdown_server
).