diff --git a/ocaml/_tags b/ocaml/_tags index 87ab315..1e23598 100644 --- a/ocaml/_tags +++ b/ocaml/_tags @@ -1 +1,2 @@ true: package(ssl,netclient,netstring,equeue-ssl) +: package(oUnit) diff --git a/ocaml/test.ml b/ocaml/test.ml new file mode 100644 index 0000000..d817e86 --- /dev/null +++ b/ocaml/test.ml @@ -0,0 +1,25 @@ +open OUnit2 + + +let test_get_title test_ctxt = + let body = " + + + + Fabien + + +

Header

+ +" in + let title = SimpleHttp.get_http_title body in + assert_equal (Some "Fabien") title + + +(* Name the test cases and group them together *) +let suite = +"suite">::: + ["test get_title">:: test_get_title] + +let () = + run_test_tt_main suite