Nunit DLL的地球
我们有以下命令,该命令应搜索所有测试的dll:
packages \ nunit.consolerrunner.3.10.0 \ tools \ nunit3-console.exe - result = $ {env:ci_project_dir} \ sonite.tests.xml`; transform = nunit3-junit3-junit3-junit.xslt-nohoheader--- noheader--代理= 5 - workers = 5 - trace = off(((ls -recurse * test(s).dll |%fullName)-Match“ \ bin \”)
在管道中,我们会收到以下错误:
术语“ s”不被识别为cmdlet,函数,脚本文件或可操作的名称
我期望在 s 是可选的情况下可以使用。我在做什么错?
编辑: 我正在从powershell命令中运行它。
We have the following command which SHOULD search for all dlls of test:
packages\NUnit.ConsoleRunner.3.10.0\tools\nunit3-console.exe --result=${env:CI_PROJECT_DIR}\sonite.tests.xml`;transform=nunit3-junit.xslt --noheader --agents=5 --workers=5 --trace=Off ((ls -Recurse *Test(s).dll | % FullName) -Match "\bin\")
In the pipeline we get the following error:
The term 's' is not recognized as the name of a cmdlet, function, script file, or operable
I was expecting this to work where s is optional. What am I doing wrong?
EDIT:
I'm running it from a powershell command.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在其中使用
test
字符串获取所有文件,并以.dll
扩展名结尾,然后检查字符串是否以test.dll
结束。或tests.dll
使用正则详细信息:
test
-test
tests?
- 可选的s
\。dll
-.dll
$
$ - 字符串的结尾。注意
-match
是情况不敏感的,如果您需要情况敏感,请使用-cmatch
。You can get all files with
Test
string in them, and end with.dll
extension, and then check if the strings ends withTest.dll
orTests.dll
using a regex:Details:
Test
-Test
s?
- an optionals
\.dll
-.dll
$
- end of string.Note
-match
is case insensitive, if you need it to be case sensitive, use-cmatch
.