Skip to content

Commit dfd2643

Browse files
committed
new tests for install with ==
1 parent ce2c006 commit dfd2643

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

t/cli/dist.t

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,37 @@ use lib 't/lib';
44
use Test::More;
55
use TestCommand;
66

7-
subtest 'command: dist' => sub {
7+
# this will be the same as ==5.024004
8+
# CPANSA-perl-2018-6798
9+
# CPANSA-perl-2018-6913
10+
# CPANSA-perl-2018-6797
11+
# CPANSA-perl-2017-12814
12+
# CPANSA-perl-2017-12837
13+
14+
subtest 'command: dist perl version' => sub {
815
my $expected_reports = 14;
916
my( $stdout, $stderr, $exit ) = TestCommand->command( 'dist', 'perl', '5.024004' );
17+
is $exit, 64 + $expected_reports, "there are $expected_reports reports";
18+
};
19+
20+
=pod
21+
22+
subtest 'command: dist perl ==version' => sub {
23+
my $expected_reports = 14;
24+
my( $stdout, $stderr, $exit ) = TestCommand->command( 'dist', 'perl', '==5.024004' );
1025
11-
unlike $stdout, qr/CPANSA-perl-2023-47(?:100|038)/, 'CVE-2023-471100 nor CVE-2023-47028 are in the reports';
26+
unlike $stdout, qr/CPANSA-perl-2023-47(?:100|038)/, 'CVE-2023-47100 nor CVE-2023-47038 are in the reports';
1227
is $exit, 64 + $expected_reports, "there are $expected_reports reports";
1328
};
1429
30+
subtest 'command: dist perl >=version' => sub {
31+
my $expected_reports = 14;
32+
my( $stdout, $stderr, $exit ) = TestCommand->command( 'dist', 'perl', '>=5.024004' );
33+
34+
unlike $stdout, qr/CPANSA-perl-2023-47(?:100|038)/, 'CVE-2023-47100 nor CVE-2023-47038 are in the reports';
35+
is $exit, 64 + $expected_reports, "there are $expected_reports reports";
36+
};
37+
38+
=cut
39+
1540
done_testing;

0 commit comments

Comments
 (0)