aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cow_http_hd.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cow_http_hd.erl b/src/cow_http_hd.erl
index e418754..895f88d 100644
--- a/src/cow_http_hd.erl
+++ b/src/cow_http_hd.erl
@@ -533,6 +533,14 @@ parse_content_length_test_() ->
{<<"1234567890 ">>, 1234567890}
],
[{V, fun() -> R = parse_content_length(V) end} || {V, R} <- Tests].
+
+parse_content_length_error_test_() ->
+ Tests = [
+ <<>>,
+ <<"123, 123">>,
+ <<"4.17">>
+ ],
+ [{V, fun() -> {'EXIT', _} = (catch parse_content_length(V)) end} || V <- Tests].
-endif.
-ifdef(PERF).