utop/test/test_lib.ml

15 lines
365 B
OCaml
Raw Normal View History

2023-06-23 12:28:14 +00:00
let test_fix_string =
let test ~name input ~expected =
(name, `Quick, fun () ->
let got = UTop.Private.fix_string input in
Alcotest.check Alcotest.string __LOC__ expected got
)
in
( "fix_string"
, [ test ~name:"small" "x" ~expected:"x"
; test ~name:"empty" "" ~expected:""
2023-06-23 12:28:14 +00:00
]
)
let () = Alcotest.run "utop" [test_fix_string]