我正在学习运行 test.sol。
我命令
forge test -m testFundUpdatesFundedDataStructure
我遇到了错误 unexpected argument '-m' found
我的代码没问题,但我认为命令有问题。
但是我尝试过
forge test
,确实编译成功了。
谁能告诉我发生了什么事吗?
是的,我遇到了同样的错误。 Foundry 已更新其 CLI 标志。所以你不再有
-m
或 --match
。
相反,您应该使用
--match-test
或简写 --mt
来指定您的测试函数正则表达式。这是官方文档以供更多参考。课程顺利!