gpt4 book ai didi

perl - 证明命令没有在 arisdottle 之后传递参数到

转载 作者:行者123 更新时间:2023-11-28 20:06:29 37 4
gpt4 key购买 nike

我试图通过 prove 命令将一些参数传递给测试脚本。基于一些旧线程,其中选项被散列,以及我证明的 man 页面的内容(在下面引用),在选项应该工作之前使用::,但证明仍在解析测试脚本的选项因为它是自己的:

$ prove -v t/040-unit-object-test.t :: --unit 270149 Unknown option: unit

这里是手册页的相关部分:

   Arguments to Tests

It is possible to supply arguments to tests. To do so separate them
from prove's own arguments with the arisdottle, '::'. For example

prove -v t/mytest.t :: --url http://example.com

would run t/mytest.t with the options '--url http://example.com'. When
running multiple tests they will each receive the same arguments.

我尝试使用 sudo 以 root 身份运行该选项,但遇到了同样的错误。

我正在使用 Getopt::Long 模块来获取选项,当我使用普通的旧 perl 运行测试脚本时,这些选项有效,但是我的 SKIP 和 TODO block 不起作用.

我宁愿不必使用 --exec 解决方法。

我在 Mac OS 10.6 上运行 Perl 5.10。

prove -V 的输出是:

prove v2.64, using Test::Harness v3.25 and Perl v5.10.0

最佳答案

那么,您的 $PATH 中必须有两个版本的 prove,一个 2006 年的旧版本,在 App::Prove 存在之前

我建议你删除那个,然后重新安装 App::Prove

关于perl - 证明命令没有在 arisdottle 之后传递参数到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13632377/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com