rm headers_lib

This commit is contained in:
swrup 2026-03-20 01:13:21 +01:00 committed by Swrup
parent 75759afe69
commit 4e707b080a
7 changed files with 29 additions and 149 deletions

View file

@ -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