anchor.diff:  
       (fun () ->
           {ok, RB} = send_recv(Sock, "not-a-command-srt\r\n", nil),
  -        ?assertMatch(RB, <<"ERROR\r\n">>)
  +        ?assertMatch(RB, <<"ERROR">>)
       end)(),
   
       (fun () ->
           {ok, RB} = send_recv(Sock, "get not-a-key-srt\r\n", nil),
  -        ?assertMatch(RB, <<"END\r\n">>)
  +        ?assertMatch(RB, <<"END">>)
       end)(),
   
       ok = gen_tcp:close(Sock).
  
positive.code:     case gen_tcp:recv(Sock, 1) of
          {ok, B} ->
              Acc2 = <<Acc/binary, B/binary>>,
              case suffix(Acc2, 2) of
                  <<"\r\n">> -> {ok, Acc2};
                  _          -> recv_line(Sock, Acc2)
              end;
          Err -> Err
      end.
  
  %% @doc returns the suffix for a binary, or <<>> if the binary is too short.
  suffix(_, 0) -> <<>>;
  suffix(Bin, SuffixLen) ->
      case size(Bin) >= SuffixLen of
          true  -> {_, Suffix} = split_binary(Bin, size(Bin) - 2),
                   Suffix;
          false -> <<>>
      end.
  
  % -------------------------------------------------
  
  suffix_test() ->
      ?assertMatch(<<"lo">>, suffix(<<"hello">>, 2)),
      ?assertMatch(<<"lo">>, suffix(<<"lo">>, 2)),
      ?assertMatch(<<>>, suffix(<<"o">>, 2)),
      ?assertMatch(<<>>, suffix(<<>>, 2)),
      ?assertMatch(<<>>, suffix(<<>>, 0)),
      ok.
  
  recv_line_test() ->
  
negative.code:         ok = gen_tcp:send(Sock, "version\r\n"),
          {ok, RB} = recv_line(Sock),
          R = binary_to_list(RB),
          ?assert(starts_with(R, "VERSION "))
      end)(),
  
      (fun () ->
          ok = gen_tcp:send(Sock, "not-a-command\r\n"),
          {ok, RB} = recv_line(Sock),
          ?assertMatch(RB, <<"ERROR">>)
      end)(),
  
      ok = gen_tcp:close(Sock).
  