use strict; use warnings; # HARNESS-NO-FORMATTER use Test2::Tools::Tiny; ######################### # # This test us here to insure that Ok renders the way we want # ######################### use Test2::API qw/test2_stack/; # Ensure the top hub is generated test2_stack->top; my $temp_hub = test2_stack->new_hub(); require Test2::Formatter::TAP; $temp_hub->format(Test2::Formatter::TAP->new); my $ok = capture { ok(1); ok(1, ""); ok(1, " "); ok(1, "A"); ok(1, "\n"); ok(1, "\nB"); ok(1, "C\n"); ok(1, "\nD\n"); ok(1, "E\n\n"); }; my $not_ok = capture { ok(0); ok(0, ""); ok(0, " "); ok(0, "A"); ok(0, "\n"); ok(0, "\nB"); ok(0, "C\n"); ok(0, "\nD\n"); ok(0, "E\n\n"); }; test2_stack->pop($temp_hub); is($ok->{STDERR}, "", "STDERR for ok is empty"); is($ok->{STDOUT}, <{STDOUT}, <