Test-More / Test-More/test-more
array, bag, and hash are vulnerable to a very easy mistake
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 149
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
use Test2::Bundle::Extended;
is {foo => 23}, hash { bar => 42 }; # passes?!
is [1,2,3], array { 5, 6, 7 }; # passes?!
is [1,2,3], bag { 5, 6, 7 }; # passes?!
done_testing;
Those all pass. I understand technically why, they're all equivalent to an empty block, but it's very confusing to the user.
I'm not sure what to do about it, but Test-More/Test2-Suite#56 will help.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Test2::Bundle::Extended examples in the issue and compare the behavior with Test-More/Test2-Suite#56. Determine the intended handling of empty blocks for hash, array, and bag assertions; done requires an agreed behavior covered by tests rather than silently accepting these mistakes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100