realworldocaml/mdx

Allow more configuration of the test command

Closed this issue · 2 comments

Currently the ocaml-mdx test command isn't very flexible with regard to its output.

It always writes it to the input file with a .corrected. While this is a good default, I think it'd be good to:

  1. Document it in the test command man page.
  2. Add a --to-stdout/-O option to write to stdout instead
  3. Add a --output <file>/-o <file> option to write to a different file

These would all be backward compatible changes with the current behaviour.

While I believe we should, in the future, try to promote the dune workflow over the ocaml-mdx test one, I think until we have a proper integration these additions would make more usable to everyone, including ourselves since I actually met that limitation while working on the test!

What do you think? @samoht @Julow

sounds like a good idea. Maybe just use -o - to write on stdout instead of adding an other option -O.

Sure! Whatever feels more standard/natural!