I'd personally prefer the syntax proposed by José.
Also, I would argue that allowing for multiple files introduces quite a bit
of unnecessary complexity.
I never had the need to run only specific tests in multiple files but I
think if it is really necessary for
someone, you can always still
Currently, if I want to run only a single test by line number, I can easily
do:
mix test test/potion_web/plugs/persist_request_plug_test.exs:92
This is parsed in ExUnit as:
Including tags: [line: "92"]
Excluding tags: [:test]
But if I want to only run two tests in a file, I need
The syntax that José proposed is common to other command line tools so I vote
for it.
I have wanted to do more than one file. As a user I’m not at all concerned with
the verbosity of the parsed version. If it isn’t a big impact on performance.
Some setups can be large, and starting of
*Stream of thoughts below.*
Can you use only instead?
mix test --only line:74 --only line:92
test/potion_web/plugs/persist_request_plug_test.exs
My only concern with your feature proposal is that it may lead to wanting
to run multiple tests across multiple files and that's a trickier problem.
`mix test --only line:74 --only line:92
test/potion_web/plugs/persist_request_plug_test.exs` does work, but don't
you think it's a little confusing to allow `--only` more than once?
I'm cool with the `mix test
test/potion_web/plugs/persist_request_plug_test.exs:92:94:102` syntax.
Whatever
Hm. I'll chip in with an opinion based on surprises I got experimenting a
bit with the mix test task.
If I wanted to run tests across multiple files identified by line numbers,
I would naively write `mix test test/some_test.exs:15
test/some_test.exs:20`.
`mix test test/some_test.exs` will run