Can't get `ppx_expect` to work with Reason


#1

2 weeks ago, I created an issue that I couldn’t get ppx_expect to work with esy and reasonml, while it works perfectly with ocaml syntax: https://github.com/facebook/reason/issues/2280

I’m not sure if it’s really a bug so I’m posting here again, maybe someone has used ppx_expect before and can help me.

I’m trying to use ppx_expect. I transformed this ocaml sample:

let%expect_test _ =
  print_endline "Hello, world!";
  [%expect{|
    Hello, world!!
  |}]

To reason:

let%expect_test "foo" = {
  print_endline("Hello, world!");
  %expect
  {|
    Hello, world!!
  |};
};

Then I don’t get any output when I run esy dune runtest, while the ocaml code works fine.


#2

Try this:

let%expect_test "foo" = {
  print_endline("Hello, world!");
  [%expect {|
    Hello, world!!
  |}];
};

#3

It was a bug in ppx_lib: https://github.com/ocaml-ppx/ppxlib/issues/54