Build systems and snapshot testing support

Good point, I described a subset of snapshot tests that could be called “command-line snapshot tests”.

Someone has to handle promotion as well. When build systems take the responsibility to run the excutables they built (typically outside the source directory), this may require some specialized machinery.

Aside: I like command-line snapshot testing for some projects because it nudges me into developing a pleasant command-line user interface (nice printers, etc.). But I would also like to be able to use snapshot testing of internal values without having to write a pretty-printers for them, as supported by the expect-tests implementation in the compiler or mdx. (Although in my experience the type-aware printers of the toplevel quickly become unpleasant to use in practice for semi-large values.) We wouldn’t necessarily need specialized machinery if one of the command-line testing tools also directly supported read-eval-print-loop programs.

(This may be an opportunity to provide a useful tool, implemented in OCaml, that would also be appreciated outside the OCaml community. My other idea in this area is a better version of hyperfine.)