Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test::cmp-ok does not accept dynamically-created routines as Str comparators #1333

Closed
zoffixznet opened this issue Dec 23, 2017 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@zoffixznet
Copy link
Contributor

<Zoffix_> m: use Test; cmp-ok 42, '!eqv', 5
<evalable6> Zoffix_, rakudo-moar b7f93bee1: OUTPUT: «(exit code 1) not ok 1 - ␤# Failed test at /tmp/uY3cdPn5Io line 1␤# Could not use '"!eqv"' as a comparator.␤»
<Zoffix_> m: use Test; cmp-ok 42, &[!eqv], 5
<evalable6> Zoffix_, rakudo-moar b7f93bee1: OUTPUT: «ok 1 - ␤»
@zoffixznet zoffixznet added good first issue This issue is likely easy for beginners to resolve LTA Less Than Awesome; typically an error message that could be better and removed good first issue This issue is likely easy for beginners to resolve labels Dec 23, 2017
zoffixznet added a commit to Raku/doc that referenced this issue Dec 23, 2017
zoffixznet referenced this issue Dec 23, 2017
Suggest to the user they need to use the &[...] Callable form.
Fixes #1334
@zoffixznet
Copy link
Contributor Author

Don't think there's a good way to make it work, since we'd have to EVAL to gen the op and to cover user ops, we'd have to eval in user's scope, but there's probably no good way to do it.

I just documented the problem and improved the error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant