Test-More / Test-More/test-more

done_testing() ignores its arguments

Open
#978 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Perl
Stars
149
Forks
98
PR merge metrics
No merged PRs in 30d

Description

@petdance noticed that done_testing ignores its arguments.

$ perl -wle 'use Test2::Bundle::Extended; pass(); done_testing(12)'
# Seeded srand with seed '20160915' from local date.
ok 1
1..1

This contradicts how Test::More behaves.

$ perl -wle 'use Test::More; pass(); done_testing(12)'
ok 1
1..12
# Looks like you planned 12 tests but ran 1.

At minimum done_testing should error instead of ignoring arguments.

I'd like to see the Test::More feature reinstated, people like their fixed plans for some reason, but @exodist says he has reasons not to and will comment.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the done_testing entry point used by Test2::Bundle::Extended and compare it with the Test::More behavior shown in the issue. Review any existing tests for fixed test plans and determine whether the intended outcome is to honor the argument or reject it; done means arguments are no longer silently ignored and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.