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

subtest plan count mismatch error not as obvious as Test::More #83

Open
plicease opened this issue Dec 25, 2015 · 1 comment
Open

subtest plan count mismatch error not as obvious as Test::More #83

plicease opened this issue Dec 25, 2015 · 1 comment

Comments

@plicease
Copy link

Consider a subtest with the wrong number of tests:

urquhart% perl -Ilib t/example1.t 
1..1
not ok 1 - foo {
# Failed test 'foo'
# at t/example1.t line 13.
    1..2
    ok 1
    ok 2
    ok 3
}

The subtest fails, but doesn't indicate WHY it failed, as Test::More does:

urquhart% perl -Ilib t/example2.t
1..1
    # Subtest: foo
    1..2
    ok 1
    ok 2
    ok 3
    # Looks like you planned 2 tests but ran 3.
not ok 1 - foo
#   Failed test 'foo'
#   at t/example2.t line 13.
# Looks like you failed 1 test of 1.

Also, a Test::Stream non subtest plan mismatches provides a diagnostic:

urquhart% perl -Ilib t/example3.t
1..2
ok 1
ok 2
ok 3
# Did not follow plan: expected 2, ran 3.
@exodist
Copy link
Member

exodist commented Dec 26, 2015

Thanks for the report. There is some codebase flux right now, but this will be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants