-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Zig version
0.11.0-dev.109+a2e67173d
As today, if we have a source:
test "read" {
...
}
test "read struct" {
...
}
We can't run single test case read
with zig test file.zig --test-filter "read"
. It will run both tests. There is no way to run specific test.
Proposal
Option 1:
--test-filter
will use pattern matching (glob or wildcard will be sufficent). For now it uses std.mem.indexOf
. It would be breaking change maybe (--test-filter
not used in compiler tests i think, only for user code). And will require to write a pattern matching code in stdlib.
Option 2:
Add another option to specify exact test case to run: --test-name
or --test-case
. It would be non breaking and easy to achieve.
Any ideas welcome.
Option 3
Write simple wildcard matching in src/test.zig, or use reference code. I prefer this option, i can even try open pull request for that.