Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Test-Compile for openSUSE:Factory checked in at 2023-07-27 16:52:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-Compile (Old) and /work/SRC/openSUSE:Factory/.perl-Test-Compile.new.32662 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Compile" Thu Jul 27 16:52:52 2023 rev:18 rq:1101005 version:3.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-Compile/perl-Test-Compile.changes 2023-04-20 15:16:16.310593775 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Test-Compile.new.32662/perl-Test-Compile.changes 2023-07-27 16:53:08.978607921 +0200 @@ -1,0 +2,17 @@ +Mon Jul 17 03:12:01 UTC 2023 - Tina Müller <[email protected]> + +- updated to 3.3.1 + see /usr/share/doc/packages/perl-Test-Compile/Changes + + v3.3.1 2023-07-17 + - Fix 'silent, no taint' mode (which doesn't cause the compile to fail) + + v3.3.0 2023-07-12 + - Tests should pass, even if Taint mode is not compiled into perl + - Improve the documentation (@dirs was a terrible name) + - Internal: improve error handling + - Internal: remove redundant constants + - Internal: simplify complex conditional (for better testing) + - Internal: more tests for better coverage + +------------------------------------------------------------------- Old: ---- Test-Compile-v3.2.2.tar.gz New: ---- Test-Compile-v3.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-Compile.spec ++++++ --- /var/tmp/diff_new_pack.yxPbzq/_old 2023-07-27 16:53:09.582611333 +0200 +++ /var/tmp/diff_new_pack.yxPbzq/_new 2023-07-27 16:53:09.590611378 +0200 @@ -18,7 +18,7 @@ %define cpan_name Test-Compile Name: perl-Test-Compile -Version: 3.2.2 +Version: 3.3.1 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Assert that your Perl files compile OK @@ -34,6 +34,9 @@ BuildRequires: perl(version) >= 0.77 Requires: perl(Exporter) >= 5.68 Requires: perl(parent) >= 0.225 +Provides: perl(Test::Compile) = 3.3.1 +Provides: perl(Test::Compile::Internal) = 3.3.1 +%define __perllib_provides /bin/true %{perl_requires} %description @@ -60,14 +63,14 @@ %autosetup -n %{cpan_name}-v%{version} %build -perl Build.PL installdirs=vendor -./Build build flags=%{?_smp_mflags} +perl Build.PL --installdirs=vendor +./Build build --flags=%{?_smp_mflags} %check ./Build test %install -./Build install destdir=%{buildroot} create_packlist=0 +./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files ++++++ Test-Compile-v3.2.2.tar.gz -> Test-Compile-v3.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/Changes new/Test-Compile-v3.3.1/Changes --- old/Test-Compile-v3.2.2/Changes 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/Changes 2023-07-17 02:04:53.000000000 +0200 @@ -1,5 +1,16 @@ Revision history for Perl extension Test-Compile +v3.3.1 2023-07-17 + - Fix 'silent, no taint' mode (which doesn't cause the compile to fail) + +v3.3.0 2023-07-12 + - Tests should pass, even if Taint mode is not compiled into perl + - Improve the documentation (@dirs was a terrible name) + - Internal: improve error handling + - Internal: remove redundant constants + - Internal: simplify complex conditional (for better testing) + - Internal: more tests for better coverage + v3.2.2 2023-04-06 - Finally understand (and fix?) the test failures on windows diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/MANIFEST new/Test-Compile-v3.3.1/MANIFEST --- old/Test-Compile-v3.2.2/MANIFEST 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/MANIFEST 2023-07-17 02:04:53.000000000 +0200 @@ -45,6 +45,7 @@ t/scripts/CVS/taint2.pl t/scripts/datafile t/scripts/failure.pl +t/scripts/Fail.pm t/scripts/LethalImport.pm t/scripts/messWithLib.pl t/scripts/Module2.pm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/META.json new/Test-Compile-v3.3.1/META.json --- old/Test-Compile-v3.2.2/META.json 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/META.json 2023-07-17 02:04:53.000000000 +0200 @@ -31,11 +31,11 @@ "provides" : { "Test::Compile" : { "file" : "lib/Test/Compile.pm", - "version" : "v3.2.2" + "version" : "v3.3.1" }, "Test::Compile::Internal" : { "file" : "lib/Test/Compile/Internal.pm", - "version" : "v3.2.2" + "version" : "v3.3.1" } }, "release_status" : "stable", @@ -47,6 +47,6 @@ "url" : "http://github.com/egiles/test-compile" } }, - "version" : "v3.2.2", + "version" : "v3.3.1", "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/META.yml new/Test-Compile-v3.3.1/META.yml --- old/Test-Compile-v3.2.2/META.yml 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/META.yml 2023-07-17 02:04:53.000000000 +0200 @@ -16,10 +16,10 @@ provides: Test::Compile: file: lib/Test/Compile.pm - version: v3.2.2 + version: v3.3.1 Test::Compile::Internal: file: lib/Test/Compile/Internal.pm - version: v3.2.2 + version: v3.3.1 requires: Exporter: '5.68' parent: '0.225' @@ -27,5 +27,5 @@ resources: license: http://dev.perl.org/licenses/ repository: http://github.com/egiles/test-compile -version: v3.2.2 +version: v3.3.1 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/lib/Test/Compile/Internal.pm new/Test-Compile-v3.3.1/lib/Test/Compile/Internal.pm --- old/Test-Compile-v3.2.2/lib/Test/Compile/Internal.pm 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/lib/Test/Compile/Internal.pm 2023-07-17 02:04:53.000000000 +0200 @@ -3,7 +3,7 @@ use warnings; use strict; -use version; our $VERSION = version->declare("v3.2.2"); +use version; our $VERSION = version->declare("v3.3.1"); use File::Find; use File::Spec; use Test::Builder; @@ -47,44 +47,43 @@ return $self; } -=item C<all_files_ok(@dirs)> +=item C<all_files_ok(@search)> Looks for perl files and tests them all for compilation errors. -If C<@dirs> is defined then it is taken as an array of files or directories to be -searched for perl files, otherwise it searches the default locations you'd expect to find -perl files in a perl module - see L</all_pm_files(@dirs)> and L</all_pl_files(@dirs)> -for details. +If C<@search> is defined then it is taken as an array of files or +directories to be searched for perl files, otherwise it searches the default +locations you'd expect to find perl files in a perl module - see +L</all_pm_files> and L</all_pl_files> for details. =cut sub all_files_ok { - my ($self, @dirs) = @_; + my ($self, @search) = @_; - my $pm_ok = $self->all_pm_files_ok(@dirs); - my $pl_ok = $self->all_pl_files_ok(@dirs); + my $pm_ok = $self->all_pm_files_ok(@search); + my $pl_ok = $self->all_pl_files_ok(@search); - if ( $pm_ok && $pl_ok ) { - return 1; - } + return ( $pm_ok && $pl_ok ); } -=item C<all_pm_files_ok(@dirs)> +=item C<all_pm_files_ok(@search)> Checks all the perl module files it can find for compilation errors. -If C<@dirs> is defined then it is taken as an array of files or directories to -be searched for perl files, otherwise it searches some default locations -- see L</all_pm_files(@dirs)>. +If C<@search> is defined then it is taken as an array of files or +directories to be searched for perl files, otherwise it searches the default +locations you'd expect to find perl files in a perl module - see +L</all_pm_files> for details. =cut sub all_pm_files_ok { - my ($self, @dirs) = @_; + my ($self, @search) = @_; my $test = $self->{test}; my $ok = 1; - for my $file ( $self->all_pm_files(@dirs) ) { + for my $file ( $self->all_pm_files(@search) ) { my $testok = $self->pm_file_compiles($file); $ok = $testok ? $ok : 0; $test->ok($testok, "$file compiles"); @@ -93,22 +92,22 @@ } -=item C<all_pl_files_ok(@dirs)> +=item C<all_pl_files_ok(@search)> Checks all the perl program files it can find for compilation errors. -If C<@dirs> is defined then it is taken as an array of directories to +If C<@search> is defined then it is taken as an array of directories to be searched for perl files, otherwise it searches some default locations -- see L</all_pl_files(@dirs)>. +- see L</all_pl_files>. =cut sub all_pl_files_ok { - my ($self, @dirs) = @_; + my ($self, @search) = @_; my $test = $self->{test}; my $ok = 1; - for my $file ( $self->all_pl_files(@dirs) ) { + for my $file ( $self->all_pl_files(@search) ) { my $testok = $self->pl_file_compiles($file); $ok = $testok ? $ok : 0; $test->ok($testok, "$file compiles"); @@ -131,34 +130,36 @@ my ($self, $verbose) = @_; if ( @_ eq 2 ) { - $self->{verbose} = $verbose; + $self->{_verbose} = $verbose; } - return $self->{verbose}; + return $self->{_verbose}; } -=item C<all_pm_files(@dirs)> +=item C<all_pm_files(@search)> -Searches for and returns a list of perl module files - that is, files with a F<.pm> -extension. +Searches for and returns a list of perl module files - that is, files with a +F<.pm> extension. -If you provide a list of C<@dirs>, it'll use that as a list of files to process, or -directories to search for perl modules. +If you provide C<@search>, it'll use that as a list of files to +process, or directories to search for perl modules. -If you don't provide C<dirs>, it'll search for perl modules in the F<blib/lib> directory, -if that directory exists, otherwise it'll search the F<lib> directory. +If you don't provide C<search>, it'll search for perl modules in the F<blib/lib> +directory (if that directory exists). Otherwise it'll search the F<lib> directory. Skips any files in F<CVS>, F<.svn>, or F<.git> directories. =cut sub all_pm_files { - my ($self, @dirs) = @_; + my ($self, @search) = @_; - @dirs = @dirs ? @dirs : $self->_default_locations('lib'); + if ( ! @search ) { + @search = $self->_default_locations('lib'); + } my @pm; - for my $file ( $self->_find_files(@dirs) ) { + for my $file ( $self->_find_files(@search) ) { if ( $self->_perl_module($file) ) { push @pm, $file; } @@ -166,29 +167,32 @@ return @pm; } -=item C<all_pl_files(@dirs)> +=item C<all_pl_files(@search)> -Searches for and returns a list of perl script files - that is, any files that either -have a case insensitive F<.pl>, F<.psgi> extension, or have no extension but have a perl shebang line. - -If you provide a list of C<@dirs>, it'll use that as a list of files to process, or -directories to search for perl scripts. - -If you don't provide C<dirs>, it'll search for perl scripts in the F<blib/script/> -and F<blib/bin/> directories if F<blib> exists, otherwise it'll search the F<script/> -and F<bin/> directories +Searches for and returns a list of perl script files - that is, any files that +either have a case insensitive F<.pl>, F<.psgi> extension, or have no extension +but have a perl shebang line. + +If you provide C<@search>, it'll use that as a list of files to +process, or directories to search for perl scripts. + +If you don't provide C<search>, it'll search for perl scripts in the +F<blib/script/> and F<blib/bin/> directories if F<blib> exists, otherwise +it'll search the F<script/> and F<bin/> directories Skips any files in F<CVS>, F<.svn>, or F<.git> directories. =cut sub all_pl_files { - my ($self, @dirs) = @_; + my ($self, @search) = @_; - @dirs = @dirs ? @dirs : $self->_default_locations('script', 'bin'); + if ( ! @search ) { + @search = $self->_default_locations('script', 'bin'); + } my @pl; - for my $file ( $self->_find_files(@dirs) ) { + for my $file ( $self->_find_files(@search) ) { if ( $self->_perl_script($file) ) { push @pl, $file; } @@ -309,7 +313,7 @@ my $pid = IPC::Open3::open3(0, $stdout, $stderr, $cmd) or die "open3() failed $!"; - my $output; + my $output = []; for my $handle ( $stdout, $stderr ) { if ( $handle ) { while ( my $line = <$handle> ) { @@ -327,7 +331,7 @@ # Works it's way through the input array (files and/or directories), recursively # finding files sub _find_files { - my ($self, @searchlist) = @_; + my ($self, @search) = @_; my @filelist; my $addFile = sub { @@ -340,7 +344,7 @@ } }; - for my $item ( @searchlist ) { + for my $item ( @search ) { $addFile->($item); if ( -d $item ) { no warnings 'File::Find'; @@ -355,7 +359,9 @@ my ($self, $file) = @_; if ( ! -f $file ) { - $self->{test}->diag("$file could not be found") if $self->verbose(); + if ( $self->verbose() ) { + $self->{test}->diag("$file could not be found"); + } return 0; } @@ -366,7 +372,7 @@ $self->{test}->diag("Executing: " . $command); } my ($compiles, $output) = $self->_run_command($command); - if ( $output && (!defined($self->verbose()) || $self->verbose() != 0) ) { + if ( !defined($self->verbose()) || $self->verbose() != 0 ) { if ( !$compiles || $self->verbose() ) { for my $line ( @$output ) { $self->{test}->diag($line); @@ -396,10 +402,11 @@ sub _read_shebang { my ($self, $file) = @_; - open(my $f, "<", $file) or die "could not open $file"; - my $line = <$f>; - if (defined $line && $line =~ m/^#!/ ) { - return $line; + if ( open(my $f, "<", $file) ) { + my $line = <$f>; + if (defined $line && $line =~ m/^#!/ ) { + return $line; + } } } @@ -437,9 +444,7 @@ sub _perl_module { my ($self, $file) = @_; - if ( $file =~ /\.pm$/ ) { - return 1; - } + return ( $file =~ /\.pm$/ ); } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/lib/Test/Compile.pm new/Test-Compile-v3.3.1/lib/Test/Compile.pm --- old/Test-Compile-v3.2.2/lib/Test/Compile.pm 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/lib/Test/Compile.pm 2023-07-17 02:04:53.000000000 +0200 @@ -3,7 +3,7 @@ use warnings; use strict; -use version; our $VERSION = version->declare("v3.2.2"); +use version; our $VERSION = version->declare("v3.3.1"); use parent 'Exporter'; use Test::Compile::Internal; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal--find-files.t new/Test-Compile-v3.3.1/t/100-internal--find-files.t --- old/Test-Compile-v3.2.2/t/100-internal--find-files.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal--find-files.t 2023-07-17 02:04:53.000000000 +0200 @@ -20,7 +20,7 @@ is(scalar @files, 0 ,"Didn't find non existent file"); @files = $internal->_find_files('t/scripts/'); -is(scalar @files, 12 ,'Found all the files in the scripts dir'); +is(scalar @files, 13 ,'Found all the files in the scripts dir'); @files = $internal->_find_files('t/scripts/datafile'); is(scalar @files, 1 ,'Found the file we specified'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal--read-shebang.t new/Test-Compile-v3.3.1/t/100-internal--read-shebang.t --- old/Test-Compile-v3.2.2/t/100-internal--read-shebang.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal--read-shebang.t 2023-07-17 02:04:53.000000000 +0200 @@ -9,11 +9,23 @@ my $internal = Test::Compile::Internal->new(); my $perl; +# Given: a file without a shebang +# When: call _read_shebang() $perl = $internal->_read_shebang('t/scripts/datafile'); +# Then ok(!$perl, "The datafile doesn't look like a perl program"); +# Given: a file with a perl shebang +# When: call _read_shebang() $perl = $internal->_read_shebang('t/scripts/perlscript'); +# Then ok($perl, "The perlscript does look like a perl program"); +# Given: a file that can't be read.. +# When: call _read_shebang() +$perl = $internal->_read_shebang('t/scripts/i-dont-exist'); +# Then: Gotta assume it's not perl +ok(!$perl, "if you can't read a file, then it's not perl"); + $internal->done_testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal-all-pl-files.t new/Test-Compile-v3.3.1/t/100-internal-all-pl-files.t --- old/Test-Compile-v3.2.2/t/100-internal-all-pl-files.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal-all-pl-files.t 2023-07-17 02:04:53.000000000 +0200 @@ -12,29 +12,38 @@ my @files; +# Given(empty input), When @files = $internal->all_pl_files(); -is(scalar @files,0,'Found correct number of scripts in default location'); +# Then +is(scalar @files, 0, "There weren't any files in the default location"); +# Given(a directory with files in it), When @files = $internal->all_pl_files('t/scripts'); -is(scalar @files,6,'Found correct number of scripts in t/scripts'); -like($files[0],qr/t.scripts.failure.pl/,'Found script: failure.pl'); -like($files[1],qr/t.scripts.messWithLib.pl/,'Found script: messWithLib.pl'); -like($files[2],qr/t.scripts.perlscript$/,'Found script: perlscript'); -like($files[3],qr/t.scripts.perlscript.psgi/i,'Found script: perlscript.pSgi'); -like($files[4],qr/t.scripts.subdir.success.pl/,'Found script: success.pl'); -like($files[5],qr/t.scripts.taint.pl/,'Found script: taint.pl'); +# Then +is(scalar @files, 6, 'Found correct number of scripts in t/scripts'); +like($files[0], qr/t.scripts.failure.pl/, 'Found script: failure.pl'); +like($files[1], qr/t.scripts.messWithLib.pl/, 'Found script: messWithLib.pl'); +like($files[2], qr/t.scripts.perlscript$/, 'Found script: perlscript'); +like($files[3], qr/t.scripts.perlscript.psgi/i, 'Found script: perlscript.pSgi'); +like($files[4], qr/t.scripts.subdir.success.pl/, 'Found script: success.pl'); +like($files[5], qr/t.scripts.taint.pl/, 'Found script: taint.pl'); -# Try specifying som files rather than directories my @search = ('t/scripts/failure.pl', 't/scripts/Module.pm'); +# Given(a file), When @files = $internal->all_pl_files($search[0]); -is(scalar @files,1,"found the specific pl file"); +# Then +is(scalar @files, 1, "found the specific pl file"); +# Given(a file that doesn't exist), When @files = $internal->all_pl_files($search[1]); -is(scalar @files,0,"didn't find the specific pm file"); +# Then +is(scalar @files, 0, "didn't find the nonexitant pm file"); +# Given(a list of files), When @files = $internal->all_pl_files(@search); -is(scalar @files,1,"only found one specific file"); -like($files[0],qr/t.scripts.failure.pl/,'Found specific file: failure.pl'); +# Then +is(scalar @files, 1, "only found one specific file"); +like($files[0], qr/t.scripts.failure.pl/, 'Found specific file: failure.pl'); $internal->done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal-all-pm-files.t new/Test-Compile-v3.3.1/t/100-internal-all-pm-files.t --- old/Test-Compile-v3.2.2/t/100-internal-all-pm-files.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal-all-pm-files.t 2023-07-17 02:04:53.000000000 +0200 @@ -16,10 +16,11 @@ like($files[1],qr/lib.Test.Compile.Internal.pm/,'Found module: Internal.pm'); @files = $internal->all_pm_files('t/scripts'); -is(@files,3,'Found correct number of modules in t/scripts'); -like($files[0],qr/t.scripts.LethalImport.pm/,'Found module: Module2.pm'); -like($files[1],qr/t.scripts.Module.pm/,'Found module: Module.pm'); -like($files[2],qr/t.scripts.Module2.pm/,'Found module: Module2.pm'); +is(@files,4,'Found correct number of modules in t/scripts'); +like($files[0],qr/t.scripts.Fail.pm/,'Found module: Module2.pm'); +like($files[1],qr/t.scripts.LethalImport.pm/,'Found module: Module2.pm'); +like($files[2],qr/t.scripts.Module.pm/,'Found module: Module.pm'); +like($files[3],qr/t.scripts.Module2.pm/,'Found module: Module2.pm'); # Try specifying some files rather than directories my @search = ('t/scripts/failure.pl', 't/scripts/Module.pm'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal-basic.t new/Test-Compile-v3.3.1/t/100-internal-basic.t --- old/Test-Compile-v3.2.2/t/100-internal-basic.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal-basic.t 2023-07-17 02:04:53.000000000 +0200 @@ -23,10 +23,13 @@ $test->ok($result, "all_files_ok returns true value"); TODO: { - local $TODO = "testing scripts that don't compile, cause the test to fail"; + local $TODO = "testing files that don't compile, cause the test to fail"; $result = $test->all_files_ok('t/scripts/failure.pl'); $test->ok($result, "failure.pl doesn't compile"); + + $result = $test->all_files_ok('t/scripts/Fail.pm'); + $test->ok($result, "Fail doesn't compile"); } # Fin... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal-pl-file-compiles.t new/Test-Compile-v3.3.1/t/100-internal-pl-file-compiles.t --- old/Test-Compile-v3.2.2/t/100-internal-pl-file-compiles.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal-pl-file-compiles.t 2023-07-17 02:04:53.000000000 +0200 @@ -3,41 +3,50 @@ use strict; use warnings; +use Config; use Test::More; use Test::Compile::Internal; my $internal = Test::Compile::Internal->new(); $internal->verbose(0); +# Is asking perl to check taint going to fail? +my $taint_checks_safe = 1; +if ( defined $Config{taint_disabled} ) { + if ( $Config{taint_disabled} eq "define" ) { + $taint_checks_safe = 0; + } +} + # Given (success.pl) # When my $yes = $internal->pl_file_compiles('t/scripts/subdir/success.pl'); # Then -is($yes,1,"success.pl should compile"); +is($yes, 1, "success.pl should compile"); # Given (taint.pl - script has -t in shebang) # When my $taint = $internal->pl_file_compiles('t/scripts/taint.pl'); # Then -is($taint,1,"taint.pl should compile - with -T enabled"); +is($taint, $taint_checks_safe, "taint.pl should compile, with -T"); # Given (taint2.pl - script has -T in shebang) # When my $taint2 = $internal->pl_file_compiles('t/scripts/CVS/taint2.pl'); # Then -is($taint2,1,"taint2.pl should compile - with -t enabled"); +is($taint2, $taint_checks_safe, "taint2.pl should compile, with -t"); # Given (failure.pl doesn't compile) # When my $failure = $internal->pl_file_compiles('t/scripts/failure.pl'); # Then -is($failure,0,"failure.pl should not compile"); +is($failure, 0, "failure.pl should not compile"); # Given (no_file_here.pl doesn't exist) # When my $not_found = $internal->pl_file_compiles('t/scripts/no_file_here.pl'); # Then -is($not_found,0,"no_file_here.pl should not compile"); +is($not_found, 0, "no_file_here.pl should not compile"); done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/100-internal-verbose.t new/Test-Compile-v3.3.1/t/100-internal-verbose.t --- old/Test-Compile-v3.2.2/t/100-internal-verbose.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/100-internal-verbose.t 2023-07-17 02:04:53.000000000 +0200 @@ -66,11 +66,11 @@ local $ENV{PERL5LIB} = join(":",@INC); for my $test ( @$tests ) { - # Given + # Given my ($verbosity, $script, $expect_output, $expect_executing) = @$test; my $cmd = "$^X $0 $verbosity $script"; - # When + # When my @output = `$cmd 2>&1`; my $found_executing = 0; @@ -80,7 +80,7 @@ } } - # Then + # Then is($found_executing, $expect_executing, "$verbosity Executing: $found_executing"); if ( $expect_output eq "output" ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/200-px-file-ok.t new/Test-Compile-v3.3.1/t/200-px-file-ok.t --- old/Test-Compile-v3.2.2/t/200-px-file-ok.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/200-px-file-ok.t 2023-07-17 02:04:53.000000000 +0200 @@ -1,7 +1,7 @@ #!perl use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 4; use Test::Compile qw( pl_file_ok pm_file_ok ); # pl_file_ok() and pm_file_ok() both call 'ok()' as required @@ -9,3 +9,5 @@ # this file is mostly just to increase the coverage. pl_file_ok('t/scripts/subdir/success.pl', 'success.pl compiles'); pm_file_ok('t/scripts/Module.pm', 'Module.pm compiles'); +pl_file_ok('t/scripts/subdir/success.pl'); +pm_file_ok('t/scripts/Module.pm'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/200-taint.t new/Test-Compile-v3.3.1/t/200-taint.t --- old/Test-Compile-v3.2.2/t/200-taint.t 2023-04-05 22:50:07.000000000 +0200 +++ new/Test-Compile-v3.3.1/t/200-taint.t 2023-07-17 02:04:53.000000000 +0200 @@ -1,8 +1,14 @@ #!perl -w use strict; use warnings; -use Test::More tests => 1; + +use Config; +use Test::More; use Test::Compile qw( pl_file_ok ); -pl_file_ok('t/scripts/taint.pl', 'taint.pl compiles'); +if ( $Config{taint_disabled} ) { + plan skip_all => "This perl was compiled without taint support"; +} +pl_file_ok('t/scripts/taint.pl', 'taint.pl compiles'); +done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Compile-v3.2.2/t/scripts/Fail.pm new/Test-Compile-v3.3.1/t/scripts/Fail.pm --- old/Test-Compile-v3.2.2/t/scripts/Fail.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Compile-v3.3.1/t/scripts/Fail.pm 2023-07-17 02:04:53.000000000 +0200 @@ -0,0 +1,2 @@ +{ 1; +
