[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.20
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
share
/
doc
/
perl-Test-Simple
/
t
/
Test2
/
behavior
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 Formatter.t
1,677 B
SET
[ EDIT ]
|
[ DEL ]
📄 Subtest_buffer_formatter.t
2,680 B
SET
[ EDIT ]
|
[ DEL ]
📄 Subtest_callback.t
906 B
SET
[ EDIT ]
|
[ DEL ]
📄 Subtest_events.t
441 B
SET
[ EDIT ]
|
[ DEL ]
📄 Subtest_plan.t
355 B
SET
[ EDIT ]
|
[ DEL ]
📄 Subtest_todo.t
932 B
SET
[ EDIT ]
|
[ DEL ]
📄 Taint.t
356 B
SET
[ EDIT ]
|
[ DEL ]
📄 disable_ipc_a.t
203 B
SET
[ EDIT ]
|
[ DEL ]
📄 disable_ipc_b.t
219 B
SET
[ EDIT ]
|
[ DEL ]
📄 disable_ipc_c.t
256 B
SET
[ EDIT ]
|
[ DEL ]
📄 disable_ipc_d.t
458 B
SET
[ EDIT ]
|
[ DEL ]
📄 err_var.t
177 B
SET
[ EDIT ]
|
[ DEL ]
📄 init_croak.t
589 B
SET
[ EDIT ]
|
[ DEL ]
📄 intercept.t
1,117 B
SET
[ EDIT ]
|
[ DEL ]
📄 ipc_wait_timeout.t
2,351 B
SET
[ EDIT ]
|
[ DEL ]
📄 nested_context_exception.t
2,139 B
SET
[ EDIT ]
|
[ DEL ]
📄 no_load_api.t
1,561 B
SET
[ EDIT ]
|
[ DEL ]
📄 run_subtest_inherit.t
2,264 B
SET
[ EDIT ]
|
[ DEL ]
📄 special_names.t
1,314 B
SET
[ EDIT ]
|
[ DEL ]
📄 subtest_bailout.t
1,182 B
SET
[ EDIT ]
|
[ DEL ]
📄 trace_signature.t
1,507 B
SET
[ EDIT ]
|
[ DEL ]
📄 uuid.t
3,414 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: Subtest_buffer_formatter.t
use strict; use warnings; use Test2::Tools::Tiny; use Test2::API qw/run_subtest intercept test2_stack/; { package Formatter::Hide; sub write { } sub hide_buffered { 1 } sub terminate { } sub finalize { } package Formatter::Show; sub write { } sub hide_buffered { 0 } sub terminate { } sub finalize { } package Formatter::NA; sub write { } sub terminate { } sub finalize { } } my %HAS_FORMATTER; my $events = intercept { my $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{unbuffered_none} = $hub->format ? 1 : 0; }; run_subtest('unbuffered', $code); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{buffered_none} = $hub->format ? 1 : 0; }; run_subtest('buffered', $code, 'BUFFERED'); ##################### test2_stack->top->format(bless {}, 'Formatter::Hide'); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{unbuffered_hide} = $hub->format ? 1 : 0; }; run_subtest('unbuffered', $code); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{buffered_hide} = $hub->format ? 1 : 0; }; run_subtest('buffered', $code, 'BUFFERED'); ##################### test2_stack->top->format(bless {}, 'Formatter::Show'); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{unbuffered_show} = $hub->format ? 1 : 0; }; run_subtest('unbuffered', $code); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{buffered_show} = $hub->format ? 1 : 0; }; run_subtest('buffered', $code, 'BUFFERED'); ##################### $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{unbuffered_na} = $hub->format ? 1 : 0; }; run_subtest('unbuffered', $code); test2_stack->top->format(bless {}, 'Formatter::NA'); $code = sub { my $hub = test2_stack->top; $HAS_FORMATTER{buffered_na} = $hub->format ? 1 : 0; }; run_subtest('buffered', $code, 'BUFFERED'); }; ok(!$HAS_FORMATTER{unbuffered_none}, "Unbuffered with no parent formatter has no formatter"); ok( $HAS_FORMATTER{unbuffered_show}, "Unbuffered where parent has 'show' formatter has formatter"); ok( $HAS_FORMATTER{unbuffered_hide}, "Unbuffered where parent has 'hide' formatter has formatter"); ok(!$HAS_FORMATTER{buffered_none}, "Buffered with no parent formatter has no formatter"); ok( $HAS_FORMATTER{buffered_show}, "Buffered where parent has 'show' formatter has formatter"); ok(!$HAS_FORMATTER{buffered_hide}, "Buffered where parent has 'hide' formatter has no formatter"); done_testing;