Linux node5458.myfcloud.com 6.10.2-x86_64-linode165 #1 SMP PREEMPT_DYNAMIC Tue Jul 30 15:03:21 EDT 2024 x86_64
Apache
: 45.79.123.194 | : 52.15.140.180
16 Domain
7.4.33
addify5
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
perl-CPAN-Meta-2.120921 /
t /
[ HOME SHELL ]
Name
Size
Permission
Action
data
[ DIR ]
drwxr-xr-x
data-bad
[ DIR ]
drwxr-xr-x
data-fail
[ DIR ]
drwxr-xr-x
00-compile.t
1.57
KB
-rw-r--r--
converter-bad.t
2.63
KB
-rw-r--r--
converter-fail.t
1.09
KB
-rw-r--r--
converter.t
8.02
KB
-rw-r--r--
load-bad.t
789
B
-rw-r--r--
meta-obj.t
5.7
KB
-rw-r--r--
no-index.t
1.72
KB
-rw-r--r--
prereqs-finalize.t
2.17
KB
-rw-r--r--
prereqs-merge.t
1.94
KB
-rw-r--r--
prereqs.t
2.55
KB
-rw-r--r--
repository.t
4.3
KB
-rw-r--r--
save-load.t
2.85
KB
-rw-r--r--
strings.t
2.26
KB
-rw-r--r--
validator.t
940
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : strings.t
use strict; use warnings; use Test::More 0.88; sub dies_ok (&@) { my ($code, $qr, $comment) = @_; my $lived = eval { $code->(); 1 }; if ($lived) { fail("$comment: did not die"); } else { like($@, $qr, $comment); } } use CPAN::Meta::Requirements; my $req = CPAN::Meta::Requirements->new; # Test == $req->add_string_requirement('Foo::Bar', '== 1.3'); ok($req->accepts_module('Foo::Bar' => '1.3'), 'exact version (==)'); ok(!$req->accepts_module('Foo::Bar' => '1.2'), 'lower version (==)'); ok(!$req->accepts_module('Foo::Bar' => '1.4'), 'higher version (==)'); # Test != $req->add_string_requirement('Foo::Baz', '!= 1.3'); ok(!$req->accepts_module('Foo::Baz' => '1.3'), 'exact version (!=)'); ok($req->accepts_module('Foo::Baz' => '1.2'), 'lower version (!=)'); ok($req->accepts_module('Foo::Baz' => '1.4'), 'higher version (!=)'); # Test >= $req->add_string_requirement('Foo::Gorch', '>= 1.3'); ok($req->accepts_module('Foo::Gorch' => '1.3'), 'exact version (>=)'); ok(!$req->accepts_module('Foo::Gorch' => '1.2'), 'lower version (>=)'); ok($req->accepts_module('Foo::Gorch' => '1.4'), 'higher version (>=)'); # Test <= $req->add_string_requirement('Foo::Graz', '<= 1.3'); ok($req->accepts_module('Foo::Graz' => '1.3'), 'exact version (<=)'); ok($req->accepts_module('Foo::Graz' => '1.2'), 'lower version (<=)'); ok(!$req->accepts_module('Foo::Graz' => '1.4'), 'higher version (<=)'); # Test "" $req->add_string_requirement('Foo::Blurb', '>= 1.3'); ok($req->accepts_module('Foo::Blurb' => '1.3'), 'exact version (>=)'); ok(!$req->accepts_module('Foo::Blurb' => '1.2'), 'lower version (>=)'); ok($req->accepts_module('Foo::Blurb' => '1.4'), 'higher version (>=)'); # Test multiple requirements $req->add_string_requirement('A::Tribe::Called', '>= 1.3, <= 2.0, != 1.6'); ok($req->accepts_module('A::Tribe::Called' => '1.5'), 'middle version (>=, <=, !)'); ok(!$req->accepts_module('A::Tribe::Called' => '1.2'), 'lower version (>=, <=, !)'); ok(!$req->accepts_module('A::Tribe::Called' => '2.1'), 'higher version (>=, <=, !)'); ok(!$req->accepts_module('A::Tribe::Called' => '1.6'), 'excluded version (>=, <=, !)'); # Test fatal errors dies_ok { $req->add_string_requirement('Foo::Bar', undef) } qr/No requirement string provided/, "die without a requirement string"; done_testing;
Close