mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
details for logs
This commit is contained in:
parent
950f0e734f
commit
6cfd1975d1
3 changed files with 10 additions and 6 deletions
|
|
@ -19,10 +19,10 @@ let () =
|
|||
match r with
|
||||
| None -> failwith "should parse"
|
||||
| Some req ->
|
||||
assert_eq (Some "coucou") (Headers.get "Host" req.Request.headers);
|
||||
assert_eq (Some "coucou") (Headers.get "host" req.Request.headers);
|
||||
assert_eq (Some "11") (Headers.get "content-length" req.Request.headers);
|
||||
assert_eq "hello" req.Request.path;
|
||||
assert_eq (Some "coucou") (Headers.get "Host" req.headers);
|
||||
assert_eq (Some "coucou") (Headers.get "host" req.headers);
|
||||
assert_eq (Some "11") (Headers.get "content-length" req.headers);
|
||||
assert_eq "hello" req.path;
|
||||
let req = Request.Private_.parse_body req str |> Request.read_body_full in
|
||||
assert_eq ~to_string:(fun s -> s) "salutations" req.Request.body;
|
||||
assert_eq ~to_string:(fun s -> s) "salutations" req.body;
|
||||
()
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
(library
|
||||
(name test_util)
|
||||
(modules test_util)
|
||||
(libraries qcheck-core qcheck-core.runner))
|
||||
(libraries logs qcheck-core qcheck-core.runner))
|
||||
|
|
|
|||
|
|
@ -29,3 +29,7 @@ let add_qcheck f = qchecks := f :: !qchecks
|
|||
|
||||
let run_qcheck_and_exit () : 'a =
|
||||
exit @@ QCheck_base_runner.run_tests ~colors:false !qchecks
|
||||
|
||||
let setup_logs_debug () =
|
||||
Logs.set_reporter @@ Logs.format_reporter ();
|
||||
Logs.set_level ~all:true @@ Some Logs.Debug
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue