⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.67
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
.cpan
/
build
/
Test-Deep-1.204-0
/
t
/
View File Name :
code.t
use strict; use warnings; use lib 't/lib'; use Std; sub cmp { my $str = shift; if ($str eq "fergal") { return 1; } elsif ($str eq "feargal") { return (0, "your name's not down, you're not coming in"); } else { return 0; } } { check_test( sub { cmp_deeply("fergal", code(\&cmp)); }, { actual_ok => 1, diag => '', }, "code ok" ); my ($prem, $res); ($prem, $res) = check_test( sub { cmp_deeply("feargal", code(\&cmp)); }, { actual_ok => 0, }, "code not ok" ); like($res->{diag}, "/your name's not down/", "diagnostics"); like($res->{diag}, "/feargal/", "diagnostics"); ($prem, $res) = check_test( sub { cmp_deeply("fazzer", code(\&cmp)); }, { actual_ok => 0, }, "code not ok" ); like($res->{diag}, "/it failed but it didn't say why/", "no diagnostics"); like($res->{diag}, "/fazzer/", "no diagnostics"); }