ACIL FM
Dark
Refresh
Current DIR:
/home/.cpan/build/Test-Warnings-0.033-0/examples
/
home
.cpan
build
Test-Warnings-0.033-0
examples
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
no_plan.t
575 B
chmod
View
DL
Edit
Rename
Delete
sub.t
279 B
chmod
View
DL
Edit
Rename
Delete
synopsis_1.t
186 B
chmod
View
DL
Edit
Rename
Delete
synopsis_2.t
331 B
chmod
View
DL
Edit
Rename
Delete
test_nowarnings.t
109 B
chmod
View
DL
Edit
Rename
Delete
test_warning_contents.t
713 B
chmod
View
DL
Edit
Rename
Delete
warning_like.t
698 B
chmod
View
DL
Edit
Rename
Delete
with_done_testing.t
695 B
chmod
View
DL
Edit
Rename
Delete
with_plan.t
652 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/.cpan/build/Test-Warnings-0.033-0/examples/warning_like.t
use strict; use warnings; # this test demonstrates the issue described in the main documentation, where # a test of the contents of a captured warning can inadvertently match another # part of the stack trace (the pattern argument to the test sub, itself!) use Test::More; use Test::Warnings ':all'; use Carp 'cluck'; sub warning_like(&$;$) { my ($code, $pattern, $name) = @_; like( &warning($code), $pattern, $name ); } warning_like(sub { cluck 'blah blah' }, qr/foo/, 'foo seems to appear in the warning'); # the test only passes when we invert it unlike( ( warning { cluck 'blah blah' } || '' ), qr/foo/, 'foo does NOT ACTUALLY appear in the warning', ); done_testing;
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply