-
Notifications
You must be signed in to change notification settings - Fork 470
Automatically add aliases for expect tests #10239
Copy link
Copy link
Closed
ocaml/opam-repository
#28357Labels
Description
Desired Behavior
For Dune's built-in expect tests, where a test executable prints to stdout and Dune diffs the output with a .expected file, it would be useful if Dune provided an alias for each test.
Expect test diffs can be large so the ability to specify a single test would be useful. Right now, the options to execute a single expect test are either to put them in separate directories or manually define each with a rule instead of the (tests ...) stanza.
Dune already provides aliases for each cram test, so extending that feature to expect tests feels natural.
Example
Directory:
.
└── test
├── dune
├── test_1.expected
├── test_1.ml
├── test_2.expected
└── test_2.ml
Contents of test/dune:
(tests (names test_1 test_2))
Commands:
$ dune build @test_1 # executes and diffs test_1
$ dune build @test_2 # executes and diffs test_2
Reactions are currently unavailable