adding all of botlist, initial add
[botlist.git] / botlistprojects / laughingman / test / erlang / src / test_shutdown_server.erl
blob51b4e7ce1840287585cbb056362859f27b20d16d
1 %%
2 %% Example eunit test case.
3 %% http://svn.process-one.net/contribs/trunk/eunit/doc/overview-summary.html
4 %%
5 %% Also see:
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").
14 -import(data_lib).
16 do_recv(Sock, Bs) ->
17 case gen_tcp:recv(Sock, 0) of
18 {ok, B} ->
19 do_recv(Sock, [Bs, B]);
20 {error, closed} ->
21 {ok, list_to_binary(Bs)}
22 end.
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"),
32 run_tests() ->
33 eunit:test(test_shutdown_server).
34 %% End of file