-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document --match-path
and --no-match-path
for forge test
#50
Comments
I took a stab at documenting this but I'm observing unexpected behavior. I have a forge project that looks like $ tree .
...
└── src
├── Contract.sol
└── test
├── ContractA.t.sol
├── ContractB.t.sol
└── ContractC.t.sol I'm observing no tests run when I expect all three tests to run $ forge test --match-path './src/test/*'
compiling...
no files changed, compilation skipped. I'm observing no tests run when I expect testA to run > forge test --match-path './src/test/ContractA.t.sol'
compiling...
no files changed, compilation skipped. I'm observing all tests run when I expect no tests to run $ forge test --no-match-path './src/test/*'
compiling...
no files changed, compilation skipped.
Running 1 test for ContractA.json:ContractA
[PASS] testA() (gas: 120)
Running 1 test for ContractB.json:ContractB
[PASS] testB() (gas: 120)
Running 1 test for ContractC.json:ContractC
[PASS] testC() (gas: 142) @lattejed can you please help me understand if I'm using these flags incorrectly? |
They require an absolute path. Internally that pattern gets prefixed with a If the ergonomics of that are too awkward, feel free to file an issue. I can revisit that |
Thanks! It works as expected now.
|
See foundry-rs/foundry#662
The relevant file this should be updated in is ./src/forge/tests.md
The text was updated successfully, but these errors were encountered: