Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing utop #45

Open
bartoszmodelski opened this issue Dec 16, 2022 · 0 comments
Open

Testing utop #45

bartoszmodelski opened this issue Dec 16, 2022 · 0 comments

Comments

@bartoszmodelski
Copy link
Contributor

bartoszmodelski commented Dec 16, 2022

Release 0.3.0 broke utop (link). It'd be nice if we could add testing to prevent such issues slipping through in the future.

I have not found anything specifically designed for testing utop, but we could have a simple test that orchestrates utop / dune utop . through dropping to command-line.

$ cat test.ml 
let test_1 () = assert false;;

let run () = 
  match test_1 () with
  | () -> Stdlib.exit 0
  | exception _ -> Stdlib.exit 1
;;

run ()
$ utop -init test.ml 
.. 
$ echo $?
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant