X7ROOT File Manager
Current Path:
/usr/share/doc/perl-Test-Simple/t/Legacy_And_Test2
usr
/
share
/
doc
/
perl-Test-Simple
/
t
/
Legacy_And_Test2
/
📁
..
📄
builder_loaded_late.t
(572 B)
📄
diag_event_on_ok.t
(499 B)
📄
hidden_warnings.t
(307 B)
📄
preload_diag_note.t
(668 B)
Editing: diag_event_on_ok.t
use strict; use warnings; use Test2::Tools::Tiny; use Test2::API qw/intercept/; use Test::More (); my $events = intercept { Test::More::ok(0, 'name'); }; my ($ok, $diag) = @$events; ok($ok->isa('Test2::Event::Ok'), "got 'ok' result"); is($ok->pass, 0, "'ok' test failed"); is($ok->name, 'name', "got 'ok' name"); ok($diag->isa('Test2::Event::Diag'), "got 'ok' result"); is($diag->message, " Failed test 'name'\n at $0 line 9.\n", "got all diag message in one diag event"); done_testing;
Upload File
Create Folder