anchor.diff:      {ok, Sock} = gen_tcp:connect("localhost", 11211,
                                    [binary, {packet, 0}, {active, false}]),
   
  -    ok = gen_tcp:send(Sock, "not-a-command\r\n"),
  -    ExpectB = <<"ERROR\r\n">>,
  -    {ok, RB} = recv_data(Sock, size(ExpectB)),
  -    ?assertMatch(RB, ExpectB),
  +    (fun () ->
  +        ok = gen_tcp:send(Sock, "not-a-command\r\n"),
  +        ExpectB = <<"ERROR\r\n">>,
  +        {ok, RB} = recv_data(Sock, size(ExpectB)),
  +        ?assertMatch(RB, ExpectB)
  +    end)(),
  +
  +    (fun () ->
  +        ok = gen_tcp:send(Sock, "get not-a-key\r\n"),
  +        ExpectB = <<"END\r\n">>,
  +        {ok, RB} = recv_data(Sock, size(ExpectB)),
  +        ?assertMatch(RB, ExpectB)
  +    end)(),
  +
  +    ok = gen_tcp:close(Sock).
  +
  +send_recv_test() ->
  +    {ok, Sock} = gen_tcp:connect("localhost", 11211,
  +                                 [binary, {packet, 0}, {active, false}]),
  +
  +    (fun () ->
  +        {ok, RB} = send_recv(Sock, "not-a-command-srt\r\n", nil),
  +        ExpectB = <<"ERROR\r\n">>,
  +        ?assertMatch(RB, ExpectB)
  +    end)(),
  +
  +    (fun () ->
  +        {ok, RB} = send_recv(Sock, "get not-a-key-srt\r\n", nil),
  +        ExpectB = <<"END\r\n">>,
  +        ?assertMatch(RB, ExpectB)
  +    end)(),
   
       ok = gen_tcp:close(Sock).
   
  
positive.code: 
  -compile(export_all).
  
  % cmd(get, Sock, RecvCB, Args) ->
  %   ok;
  % cmd(version, Sock, RecvCB, Args) ->
  %   ok.
  
  %% @doc receive binary data of specified number of bytes length.
  recv_data(_, 0) -> <<>>;
  
negative.code:         Err -> Err
      end.
  
  %% @doc receive a binary CRNL terminated line, including the CRNL.
  recv_line(Sock) ->
      recv_line(Sock, <<>>).
  
  