作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我真的想不通。显然,zef
执行模块的某种排列和预编译,但在 this case这真的很关键,因为它似乎只是使用了不同版本的代码。例如,运行一个失败的测试,
raku -Ilib t/01-basic.t # ok 1 - get-all() found Licenses
但是,
zef test .
未能通过该测试(以及许多其他如果在本地运行也可以工作)
➜ 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 .
以同样的方式失败。知道为什么会发生这种情况以及是否有一些解决方法吗?
最佳答案
zef 不使用 -Ilib
-- 我个人认为告诉人们使用它是有害的 -- 它使用 -I.
➜ License-Software git:(master) raku -Ilib t/01-basic.t
1..1
ok 1 - get-all() found Licenses
➜ 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.
.
关于unit-testing - "zef test ."返回的结果与使用 raku -Ilib 运行某些测试不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63634828/
我有一个本地分布,如下所示: . ├── META6.json └── lib └── Foo.pm6 两个perl6 -I. -e 'use Foo;'和 perl6 -Ilib -e 'u
我真的想不通。显然,zef执行模块的某种排列和预编译,但在 this case这真的很关键,因为它似乎只是使用了不同版本的代码。例如,运行一个失败的测试, raku -Ilib t/01-basic.
我使用以下两个命令在我的应用程序中运行测试: ruby -Ilib test/unit/account_test.rb ruby -Itest test/unit/account_test.rb 两者
我是一名优秀的程序员,十分优秀!