ACIL FM
Dark
Refresh
Current DIR:
/usr/share/doc/perl-Test-Simple/t/Test2/behavior
/
usr
share
doc
perl-Test-Simple
t
Test2
behavior
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
disable_ipc_a.t
203 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_b.t
219 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_c.t
256 B
chmod
View
DL
Edit
Rename
Delete
disable_ipc_d.t
458 B
chmod
View
DL
Edit
Rename
Delete
err_var.t
177 B
chmod
View
DL
Edit
Rename
Delete
Formatter.t
1.64 MB
chmod
View
DL
Edit
Rename
Delete
init_croak.t
589 B
chmod
View
DL
Edit
Rename
Delete
intercept.t
1.09 MB
chmod
View
DL
Edit
Rename
Delete
ipc_wait_timeout.t
2.3 MB
chmod
View
DL
Edit
Rename
Delete
nested_context_exception.t
2.09 MB
chmod
View
DL
Edit
Rename
Delete
no_load_api.t
1.52 MB
chmod
View
DL
Edit
Rename
Delete
run_subtest_inherit.t
2.21 MB
chmod
View
DL
Edit
Rename
Delete
special_names.t
1.28 MB
chmod
View
DL
Edit
Rename
Delete
subtest_bailout.t
1.15 MB
chmod
View
DL
Edit
Rename
Delete
Subtest_buffer_formatter.t
2.62 MB
chmod
View
DL
Edit
Rename
Delete
Subtest_callback.t
906 B
chmod
View
DL
Edit
Rename
Delete
Subtest_events.t
441 B
chmod
View
DL
Edit
Rename
Delete
Subtest_plan.t
355 B
chmod
View
DL
Edit
Rename
Delete
Subtest_todo.t
932 B
chmod
View
DL
Edit
Rename
Delete
Taint.t
356 B
chmod
View
DL
Edit
Rename
Delete
trace_signature.t
1.47 MB
chmod
View
DL
Edit
Rename
Delete
uuid.t
3.33 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/share/doc/perl-Test-Simple/t/Test2/behavior/run_subtest_inherit.t
use strict; use warnings; use Test2::Tools::Tiny; use Test2::API qw/run_subtest intercept context/; # Test a subtest that should inherit the trace from the tool that calls it my ($file, $line) = (__FILE__, __LINE__ + 1); my $events = intercept { my_tool_inherit() }; is(@$events, 1, "got 1 event"); my $e = shift @$events; ok($e->isa('Test2::Event::Subtest'), "got a subtest event"); is($e->trace->file, $file, "subtest is at correct file"); is($e->trace->line, $line, "subtest is at correct line"); my $plan = pop @{$e->subevents}; ok($plan->isa('Test2::Event::Plan'), "Removed plan"); for my $se (@{$e->subevents}) { is($se->trace->file, $file, "subtest event is at correct file"); is($se->trace->line, $line, "subtest event is at correct line"); ok($se->facets->{assert}->pass, "subtest event passed"); } # Test a subtest that should NOT inherit the trace from the tool that calls it ($file, $line) = (__FILE__, __LINE__ + 1); $events = intercept { my_tool_no_inherit() }; is(@$events, 1, "got 1 event"); $e = shift @$events; ok($e->isa('Test2::Event::Subtest'), "got a subtest event"); is($e->trace->file, $file, "subtest is at correct file"); is($e->trace->line, $line, "subtest is at correct line"); $plan = pop @{$e->subevents}; ok($plan->isa('Test2::Event::Plan'), "Removed plan"); for my $se (@{$e->subevents}) { ok($se->trace->file ne $file, "subtest event is not in our file"); ok($se->trace->line ne $line, "subtest event is not on our line"); ok($se->facets->{assert}->{pass}, "subtest event passed"); } done_testing; # Make these tools appear to be in a different file/line #line 100 'fake.pm' sub my_tool_inherit { my $ctx = context(); run_subtest( 'foo', sub { ok(1, 'a'); ok(2, 'b'); is_deeply(\@_, [qw/arg1 arg2/], "got args"); }, {buffered => 1, inherit_trace => 1}, 'arg1', 'arg2' ); $ctx->release; } sub my_tool_no_inherit { my $ctx = context(); run_subtest( 'foo', sub { ok(1, 'a'); ok(2, 'b'); is_deeply(\@_, [qw/arg1 arg2/], "got args"); }, {buffered => 1, inherit_trace => 0}, 'arg1', 'arg2' ); $ctx->release; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply