@@ -4,12 +4,37 @@ use lib 't/lib';
4
4
use Test::More;
5
5
use TestCommand;
6
6
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 {
8
15
my $expected_reports = 14;
9
16
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' );
10
25
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';
12
27
is $exit, 64 + $expected_reports, "there are $expected_reports reports";
13
28
};
14
29
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
+
15
40
done_testing;
0 commit comments