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"
|
2023-06-23 13:09:05 +00:00
|
|
|
; test ~name:"empty" "" ~expected:""
|
2023-06-23 12:28:14 +00:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
let () = Alcotest.run "utop" [test_fix_string]
|