Also parse "done" lines

This works well for now, but if we're going to support
multi_ack_detailed at some point, we need a better way of parsing the
particular pkt.
This commit is contained in:
Carlos Martín Nieto
2013-05-31 13:56:49 +02:00
parent 3ec3c454c8
commit bd510de1e3
2 changed files with 20 additions and 6 deletions

View File

@@ -8,6 +8,11 @@ flush_test() ->
Actual = geef_pkt:parse("0000"),
?assertEqual(Expected, Actual).
done_test() ->
Expected = {done, <<>>},
Actual = geef_pkt:parse("0009done\n"),
?assertEqual(Expected, Actual).
have_test() ->
Expected = {{want, geef_oid:parse("e17ca7f2d877acbf8b9a9a1cb4c243ca72e86463")}, <<>>},
Actual = geef_pkt:parse("0032want e17ca7f2d877acbf8b9a9a1cb4c243ca72e86463\n"),