首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"zef测试。“返回与使用raku -Ilib运行某些测试不同的结果

"zef测试。“返回与使用raku -Ilib运行某些测试不同的结果
EN

Stack Overflow用户
提问于 2020-08-28 21:34:36
回答 1查看 79关注 0票数 4

我真的搞不懂这事。显然,zef执行某种类型的模块排列和预编译,但在this case中这一点非常关键,因为它似乎只是使用了不同版本的代码。例如,运行其中一个失败的测试,

代码语言:javascript
复制
raku -Ilib t/01-basic.t # ok 1 - get-all() found Licenses

但是,zef test .无法通过该测试(以及许多其他在本地运行也可以工作的测试)。

代码语言:javascript
复制
➜  License-Software-mine git:(master) ✗ zef test .
===> Testing: License::Software:ver<0.3.0>:auth<kalkin>
[License::Software] # Failed test 'get-all() found Licenses'
[License::Software] # at t/01-basic.t line 8
[License::Software] # You failed 1 test of 1
[License::Software] Can not find license alias 'gplv3'
[License::Software]   in sub license at /home/jmerelo/progs/forks/perl6/License-Software-mine/lib/License/Software.pm6 (License::Software) line 174
[License::Software] # Failed test at t/10-gplv3.t line 8
[License::Software] Method 'aliases' must be implemented by License::Software::Abstract because it is required by roles: .
[License::Software]   in block <unit> at t/10-gplv3.t line 9
[License::Software] # You planned 10 tests, but ran 1
[License::Software] # You failed 1 test of 1
[License::Software] Can not find license alias 'apache'
[License::Software]   in sub license at /home/jmerelo/progs/forks/perl6/License-Software-mine/lib/License/Software.pm6 (License::Software) line 174
[License::Software] Method 'aliases' must be implemented by License::Software::Abstract because it is required by roles: .
[License::Software]   in block <unit> at t/11-Apache2.t line 10
[License::Software] Can not find license alias 'lgplv3'
[License::Software]   in sub license at /home/jmerelo/progs/forks/perl6/License-Software-mine/lib/License/Software.pm6 (License::Software) line 174
[License::Software] # Failed test at t/12-LGPLv3.t line 8
[License::Software] Method 'aliases' must be implemented by License::Software::Abstract because it is required by roles: .
[License::Software]   in block <unit> at t/12-LGPLv3.t line 9
[License::Software] # You planned 8 tests, but ran 1
[License::Software] # You failed 1 test of 1
[License::Software] Can not find license alias 'agplv3'
[License::Software]   in sub license at /home/jmerelo/progs/forks/perl6/License-Software-mine/lib/License/Software.pm6 (License::Software) line 174
[License::Software] # Failed test at t/13-AGPLv3.t line 7
[License::Software] Method 'aliases' must be implemented by License::Software::Abstract because it is required by roles: .
[License::Software]   in block <unit> at t/13-AGPLv3.t line 8
[License::Software] # You planned 11 tests, but ran 1
[License::Software] # You failed 1 test of 1
[License::Software] Can not find license alias 'artistic'
[License::Software]   in sub license at /home/jmerelo/progs/forks/perl6/License-Software-mine/lib/License/Software.pm6 (License::Software) line 174
[License::Software] # Failed test at t/14-Artistic2.t line 7
[License::Software] Method 'aliases' must be implemented by License::Software::Abstract because it is required by roles: .
[License::Software]   in block <unit> at t/14-Artistic2.t line 8
[License::Software] # You planned 8 tests, but ran 1
[License::Software] # You failed 1 test of 1
===> Testing [FAIL]: License::Software:ver<0.3.0>:auth<kalkin>
Aborting due to test failure: License::Software:ver<0.3.0>:auth<kalkin> (use --force-test to override)

zef install .也会以同样的方式失败。你知道为什么会发生这种情况吗?如果有解决办法的话?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-08-28 23:04:36

zef不使用-Ilib --我个人认为告诉人们使用它是有害的--它使用的是-I.

代码语言:javascript
复制
➜  License-Software git:(master) raku -Ilib t/01-basic.t
1..1
ok 1 - get-all() found Licenses
代码语言:javascript
复制
➜  License-Software git:(master) raku -I. t/01-basic.t
1..1
not ok 1 - get-all() found Licenses
# Failed test 'get-all() found Licenses'
# at t/01-basic.t line 8
# You failed 1 test of 1

现在很明显,zef本身没有做任何预编译,也没有使用不同版本的代码。您还使用了一个插件模块,并且所有的错误都引用了附加到的内容。因此,我只能假设您正在使用的插件代码不能与-I.一起工作。

票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63634828

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档