rm headers_lib
This commit is contained in:
parent
75759afe69
commit
4e707b080a
7 changed files with 29 additions and 149 deletions
36
test/test.ml
36
test/test.ml
|
|
@ -54,42 +54,6 @@ let () =
|
|||
assert (Result.is_error r);
|
||||
()
|
||||
|
||||
let () =
|
||||
let open Headers_lib.If_none_match in
|
||||
let ok_l =
|
||||
[
|
||||
"*";
|
||||
"\"foo\"";
|
||||
"W/\"foo\"";
|
||||
"\"foo\", \"bar\"";
|
||||
" , W/\"x\" , W/\"y\" , \"z\"";
|
||||
", \"one\" , \"two\" , \"three\"";
|
||||
"W/\"a\" , ";
|
||||
"W/\"a\" , \"b\"";
|
||||
]
|
||||
in
|
||||
let bad_l =
|
||||
[
|
||||
"";
|
||||
"foo";
|
||||
"W/foo";
|
||||
"W/\"unterminated";
|
||||
"\"foo\", W/";
|
||||
"* , \"bar\"";
|
||||
"\"a\" \"b\"";
|
||||
"W/\"a\" W/\"b\"";
|
||||
"\"fo\x7Fo\"";
|
||||
" W/\"a\"";
|
||||
"W/\"a\" ";
|
||||
]
|
||||
in
|
||||
let check_ok input = assert (Result.is_ok (parse input)) in
|
||||
let check_bad input = assert (Result.is_error (parse input)) in
|
||||
List.iter check_ok ok_l;
|
||||
List.iter check_bad bad_l;
|
||||
|
||||
()
|
||||
|
||||
let () =
|
||||
let round_trip s =
|
||||
let s' = s |> B32.encode |> B32.decode |> Result.get_ok in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue