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

Output from streamed subtest inside buffered subtest is lost #721

Closed
autarch opened this issue Sep 17, 2016 · 1 comment
Closed

Output from streamed subtest inside buffered subtest is lost #721

autarch opened this issue Sep 17, 2016 · 1 comment

Comments

@autarch
Copy link
Contributor

autarch commented Sep 17, 2016

use strict;
use warnings;

use Test2::Bundle::Extended;
use Test2::Tools::Subtest;

subtest_buffered(
    'parent',
    sub {
        subtest_buffered(
            'buffered',
            sub {
                ok(1, 'b1');
                ok(1, 'b2');
            },
        );
        subtest_streamed(
            'streamed',
            sub {
                ok(1, 's1');
                ok(1, 's2');
            },
        );
    }
);

done_testing;

Outputs:

# Seeded srand with seed '20160917' from local date.
ok 1 - parent {
    ok 1 - buffered {
        ok 1 - b1
        ok 2 - b2
        1..2
    }
    # streamed
    ok 2 - streamed
    1..2
}
1..1
exodist added a commit that referenced this issue Sep 18, 2016
    - Doc fixes
    - Win32 color support in Test::Builder::Tester
    - Support v-strings in is_deeply
    - A streamed subtest run inside a buffered subtest will be automatically
      converted to a buffered subtest. Otherwise the output from inside the
      subtest is lost entirely. (#721)
@exodist
Copy link
Member

exodist commented Oct 24, 2016

this was fixed in 342a857

@exodist exodist closed this as completed Oct 24, 2016
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