Hello community, here is the log from the commit of package perl-Test-Script for openSUSE:Factory checked in at 2016-05-08 10:45:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-Script (Old) and /work/SRC/openSUSE:Factory/.perl-Test-Script.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Script" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-Script/perl-Test-Script.changes 2015-05-15 07:44:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Test-Script.new/perl-Test-Script.changes 2016-05-08 10:46:15.000000000 +0200 @@ -1,0 +2,21 @@ +Thu May 5 10:16:54 UTC 2016 - co...@suse.com + +- updated to 1.12 + see /usr/share/doc/packages/perl-Test-Script/Changes + + 1.12 2016-05-02 11:18:01 -0400 + - Production release identical to 1.11_03 release. + + 1.11_03 2016-04-28 06:45:52 -0400 + - Check for IO errors on temporary .pm file + + 1.11_02 2016-04-27 13:15:35 -0400 + - One possible fix for gh#5 + (see https://github.com/plicease/Test-Script/issues/5) + + 1.11_01 2016-04-27 12:28:33 -0400 + - Including some optional Test2 based tests that should + only be run with a merged Test2 / Test::Builder + (currently a dev release as Test::Simple on CPAN) + +------------------------------------------------------------------- Old: ---- Test-Script-1.10.tar.gz New: ---- Test-Script-1.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-Script.spec ++++++ --- /var/tmp/diff_new_pack.rG0s9d/_old 2016-05-08 10:46:16.000000000 +0200 +++ /var/tmp/diff_new_pack.rG0s9d/_new 2016-05-08 10:46:16.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Test-Script # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-Test-Script -Version: 1.10 +Version: 1.12 Release: 0 %define cpan_name Test-Script Summary: Basic cross-platform tests for scripts ++++++ Test-Script-1.10.tar.gz -> Test-Script-1.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/Changes new/Test-Script-1.12/Changes --- old/Test-Script-1.10/Changes 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/Changes 2016-05-02 17:18:04.000000000 +0200 @@ -1,5 +1,20 @@ Revision history for Perl extension Test-Script +1.12 2016-05-02 11:18:01 -0400 + - Production release identical to 1.11_03 release. + +1.11_03 2016-04-28 06:45:52 -0400 + - Check for IO errors on temporary .pm file + +1.11_02 2016-04-27 13:15:35 -0400 + - One possible fix for gh#5 + (see https://github.com/plicease/Test-Script/issues/5) + +1.11_01 2016-04-27 12:28:33 -0400 + - Including some optional Test2 based tests that should + only be run with a merged Test2 / Test::Builder + (currently a dev release as Test::Simple on CPAN) + 1.10 2015-05-12 05:15:41 -0400 - Work around for buggy IPC::Run3 0.048 on MSWin32 On Windows we probe for and mitigate a bug in IPC::Run3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/MANIFEST new/Test-Script-1.12/MANIFEST --- old/Test-Script-1.10/MANIFEST 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/MANIFEST 2016-05-02 17:18:04.000000000 +0200 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.036. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.003. Changes INSTALL LICENSE @@ -10,9 +10,8 @@ cpanfile dist.ini lib/Test/Script.pm +run_test.pl t/00_diag.t -t/00_diag.txt -t/00_diag2.t t/01_compile.t t/02_compiles_good.t t/03_compiles_bad.t @@ -27,6 +26,9 @@ t/bin/good.pl t/bin/print.pl t/bin/signal.pl +t2/test_script__exports.t +t2/test_script__script_compiles.t +t2/test_script__script_runs.t xt/release/eol.t xt/release/fixme.t xt/release/no_tabs.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/META.json new/Test-Script-1.12/META.json --- old/Test-Script-1.10/META.json 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/META.json 2016-05-02 17:18:04.000000000 +0200 @@ -5,7 +5,7 @@ "Adam Kennedy" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001", + "generated_by" : "Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], @@ -21,6 +21,23 @@ "perl" : "5.006" } }, + "develop" : { + "recommends" : { + "YAML::XS" : "0" + }, + "requires" : { + "FindBin" : "0", + "Test::EOL" : "0", + "Test::Fixme" : "0.07", + "Test::More" : "0.94", + "Test::NoTabs" : "0", + "Test::Pod" : "0", + "Test::Pod::Coverage" : "0", + "Test::Pod::Spelling::CommonMistakes" : "0", + "Test::Spelling" : "0", + "YAML" : "0" + } + }, "runtime" : { "requires" : { "File::Spec" : "0.80", @@ -33,7 +50,6 @@ }, "test" : { "requires" : { - "File::Spec::Functions" : "0", "Test::Builder" : "0.32", "Test::Builder::Tester" : "1.02", "Test::More" : "0.96", @@ -54,6 +70,6 @@ "web" : "https://github.com/plicease/Test-Script" } }, - "version" : "1.10" + "version" : "1.12" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/META.yml new/Test-Script-1.12/META.yml --- old/Test-Script-1.10/META.yml 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/META.yml 2016-05-02 17:18:04.000000000 +0200 @@ -4,7 +4,6 @@ - 'Graham Ollis <plice...@cpan.org>' - 'Adam Kennedy' build_requires: - File::Spec::Functions: '0' Test::Builder: '0.32' Test::Builder::Tester: '1.02' Test::More: '0.96' @@ -14,7 +13,7 @@ ExtUtils::MakeMaker: '0' perl: '5.006' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001' +generated_by: 'Dist::Zilla version 6.003, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -31,4 +30,4 @@ bugtracker: https://github.com/plicease/Test-Script/issues homepage: http://perl.wdlabs.com/Test-Script repository: git://github.com/plicease/Test-Script.git -version: '1.10' +version: '1.12' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/Makefile.PL new/Test-Script-1.12/Makefile.PL --- old/Test-Script-1.10/Makefile.PL 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/Makefile.PL 2016-05-02 17:18:04.000000000 +0200 @@ -1,10 +1,16 @@ +use strict; use warnings; BEGIN { + sub MY::test_via_harness + { + my(undef, $perl, undef) = @_; + "\t$perl run_test.pl"; + } unless(eval q{ use 5.006; 1}) { print "Perl 5.006 or better required\n"; exit; } } -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.036. +# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.03. use strict; use warnings; @@ -19,10 +25,12 @@ "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Test-Script", - "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Test::Script", + "PM" => { + "lib/Test/Script.pm" => "\$(INST_LIB)/Test/Script.pm" + }, "PREREQ_PM" => { "File::Spec" => "0.80", "IPC::Run3" => "0.034", @@ -31,13 +39,12 @@ "Test::More" => "0.96" }, "TEST_REQUIRES" => { - "File::Spec::Functions" => 0, "Test::Builder" => "0.32", "Test::Builder::Tester" => "1.02", "Test::More" => "0.96", "Test::Tester" => 0 }, - "VERSION" => "1.10", + "VERSION" => "1.12", "test" => { "TESTS" => "t/*.t" } @@ -45,9 +52,7 @@ my %FallbackPrereqs = ( - "ExtUtils::MakeMaker" => 0, "File::Spec" => "0.80", - "File::Spec::Functions" => 0, "IPC::Run3" => "0.034", "Probe::Perl" => "0.01", "Test::Builder" => "0.32", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/README new/Test-Script-1.12/README --- old/Test-Script-1.10/README 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/README 2016-05-02 17:18:04.000000000 +0200 @@ -4,15 +4,15 @@ VERSION - version 1.10 + version 1.12 SYNOPSIS use Test::More tests => 2; use Test::Script; - script_compiles('script/awesomescript.pl'); - script_runs(['script/awesomescript.pl', '--awesome-argument']); + script_compiles('script/myscript.pl'); + script_runs(['script/myscript.pl', '--my-argument']); DESCRIPTION @@ -177,6 +177,22 @@ Tests if the output to stderr from the previous "script_runs" does NOT match the regular expression. +CAVEATS + + This module is fully supported back to Perl 5.8.1. It may work on + 5.8.0. It should work on Perl 5.6.x and I may even test on 5.6.2. I + will accept patches to maintain compatibility for such older Perls, but + you may need to fix it on 5.6.x / 5.8.0 and send me a patch. + + This module uses IPC::Run3 to compile and run scripts. There are a + number of outstanding issues with this module, and maintenance for + IPC::Run3 is not swift. One of these is that IPC::Run3 incorrectly + throws an exception on Windows when you feed it a Perl script with a + compile error. Currently Test::Script probes for this bug (it checks + for the bug, not for a specific version) and applies a workaround in + that case. I am hoping to remove the work around once the bug is fixed + in IPC::Run3. + SEE ALSO Test::Script::Run, Test::More diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/cpanfile new/Test-Script-1.12/cpanfile --- old/Test-Script-1.10/cpanfile 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/cpanfile 2016-05-02 17:18:04.000000000 +0200 @@ -6,7 +6,6 @@ requires "perl" => "5.006"; on 'test' => sub { - requires "File::Spec::Functions" => "0"; requires "Test::Builder" => "0.32"; requires "Test::Builder::Tester" => "1.02"; requires "Test::More" => "0.96"; @@ -18,3 +17,20 @@ requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.006"; }; + +on 'develop' => sub { + requires "FindBin" => "0"; + requires "Test::EOL" => "0"; + requires "Test::Fixme" => "0.07"; + requires "Test::More" => "0.94"; + requires "Test::NoTabs" => "0"; + requires "Test::Pod" => "0"; + requires "Test::Pod::Coverage" => "0"; + requires "Test::Pod::Spelling::CommonMistakes" => "0"; + requires "Test::Spelling" => "0"; + requires "YAML" => "0"; +}; + +on 'develop' => sub { + recommends "YAML::XS" => "0"; +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/dist.ini new/Test-Script-1.12/dist.ini --- old/Test-Script-1.10/dist.ini 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/dist.ini 2016-05-02 17:18:04.000000000 +0200 @@ -4,14 +4,30 @@ license = Perl_5 copyright_holder = Adam Kennedy copyright_year = 2006 -version = 1.10 +version = 1.12 [@Author::Plicease] -:version = 1.70 +:version = 1.94 +travis_status = 1 release_tests = 1 -installer = MakeMaker release_tests_skip = (changes|strict)\.t +diag_preamble = | $post_diag = sub +diag_preamble = | { +diag_preamble = | eval { +diag_preamble = | require Test::Script; +diag_preamble = | diag "probing IPC::Run3 for rt94685 rt46333 rt95308 gh#9"; +diag_preamble = | diag "IPC::Run3 is ", Test::Script::_borked_ipc_run3() ? 'borked' : 'good'; +diag_preamble = | 1; +diag_preamble = | } || diag "eval failed: $@"; +diag_preamble = | }; + +preamble = | sub MY::test_via_harness +preamble = | { +preamble = | my(undef, $perl, undef) = @_; +preamble = | "\t$perl run_test.pl"; +preamble = | } + [RemovePrereqs] remove = strict remove = warnings @@ -20,6 +36,9 @@ remove = Carp remove = Exporter remove = File::Spec::Unix +remove = File::Spec::Functions +remove = File::Temp +remove = File::Path [Prereqs] File::Spec = 0.80 @@ -35,8 +54,6 @@ [Author::Plicease::Upload] cpan = 1 -[Author::Plicease::InstallerPerlVersion] - [Author::Plicease::Thanks] current = Graham Ollis <plice...@cpan.org> original = Adam Kennedy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/lib/Test/Script.pm new/Test-Script-1.12/lib/Test/Script.pm --- old/Test-Script-1.10/lib/Test/Script.pm 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/lib/Test/Script.pm 2016-05-02 17:18:04.000000000 +0200 @@ -1,7 +1,7 @@ package Test::Script; # ABSTRACT: Basic cross-platform tests for scripts -our $VERSION = '1.10'; # VERSION +our $VERSION = '1.12'; # VERSION use 5.006; @@ -14,6 +14,8 @@ use Probe::Perl (); use IPC::Run3 qw( run3 ); use Test::Builder (); +use File::Temp (); +use File::Path (); our @ISA = 'Exporter'; our @EXPORT = qw{ @@ -66,7 +68,7 @@ ## See rt94685, rt46333, rt95308 and IPC-Run3/gh#9" sub _borked_ipc_run3 () { $^O eq 'MSWin32' && - ! eval { $! = 0; IPC::Run3::run3 [ perl, -e => 'BEGIN {die}' ], \undef, \undef, \undef; 1 } + ! eval { IPC::Run3::run3 [ perl, -e => 'BEGIN {die}' ], \undef, \undef, \undef; 1 } } if(_borked_ipc_run3()) @@ -89,7 +91,8 @@ my $unix = shift @$args; my $path = path( $unix ); my @libs = map { "-I$_" } grep {!ref($_)} @INC; - my $cmd = [ perl, @libs, '-c', $path, @$args ]; + my $dir = _preload_module(); + my $cmd = [ perl, "-I$dir", '-M__TEST_SCRIPT__', '-c', $path, @$args ]; my $stdin = ''; my $stdout = ''; my $stderr = ''; @@ -101,6 +104,8 @@ $error eq '' and $rv and $exit == 0 and $signal == 0 and $stderr =~ /syntax OK\s+\z/si ); + File::Path::rmtree($dir); + my $test = Test::Builder->new; $test->ok( $ok, $_[0] || "Script $unix compiles" ); $test->diag( "$exit - $stderr" ) unless $ok; @@ -110,6 +115,29 @@ return $ok; } +# this is noticably slower for long @INC lists (sometimes present in cpantesters +# boxes) than the previous implementation, which added a -I for every element in +# @INC. (also slower for more reasonable @INCs, but not noticably). But it is +# safer as very long argument lists can break calls to system +sub _preload_module +{ + my $dir = File::Temp::tempdir( CLEANUP => 1 ); + # this is hopefully a pm file that nobody would use + my $filename = File::Spec->catfile($dir, '__TEST_SCRIPT__.pm'); + my $fh; + open($fh, ">$filename") + || die "unable to open $filename: $!"; + print($fh 'unshift @INC, ', + join ',', + # quotemeta is overkill, but it will make sure that characters + # like " are quoted + map { '"' . quotemeta . '"' } + grep { ! ref } @INC) + || die "unable to write $filename: $!"; + close($fh) || die "unable to close $filename: $!";; + $dir; +} + my $stdout; my $stderr; @@ -119,8 +147,8 @@ my $opt = _options(\@_); my $unix = shift @$args; my $path = path( $unix ); - my @libs = map { "-I$_" } grep {!ref($_)} @INC; - my $cmd = [ perl, @libs, $path, @$args ]; + my $dir = _preload_module(); + my $cmd = [ perl, "-I$dir", '-M__TEST_SCRIPT__', $path, @$args ]; $stdout = ''; $stderr = ''; my $rv = eval { run3( $cmd, $opt->{stdin}, $opt->{stdout}, $opt->{stderr} ) }; @@ -129,6 +157,8 @@ my $signal = $? ? ($? & 127) : 0; my $ok = !! ( $error eq '' and $rv and $exit == $opt->{exit} and $signal == $opt->{signal} ); + File::Path::rmtree($dir); + my $test = Test::Builder->new; $test->ok( $ok, $_[0] || "Script $unix runs" ); $test->diag( "$exit - $stderr" ) unless $ok; @@ -285,15 +315,15 @@ =head1 VERSION -version 1.10 +version 1.12 =head1 SYNOPSIS use Test::More tests => 2; use Test::Script; - script_compiles('script/awesomescript.pl'); - script_runs(['script/awesomescript.pl', '--awesome-argument']); + script_compiles('script/myscript.pl'); + script_runs(['script/myscript.pl', '--my-argument']); =head1 DESCRIPTION @@ -467,12 +497,25 @@ Tests if the output to stderr from the previous L</script_runs> does NOT match the regular expression. +=head1 CAVEATS + +This module is fully supported back to Perl 5.8.1. It may work on 5.8.0. +It should work on Perl 5.6.x and I may even test on 5.6.2. I will accept +patches to maintain compatibility for such older Perls, but you may +need to fix it on 5.6.x / 5.8.0 and send me a patch. + +This module uses L<IPC::Run3> to compile and run scripts. There are a number of +outstanding issues with this module, and maintenance for L<IPC::Run3> is not swift. +One of these is that L<IPC::Run3> incorrectly throws an exception on Windows when +you feed it a Perl script with a compile error. Currently L<Test::Script> probes +for this bug (it checks for the bug, not for a specific version) and applies a +workaround in that case. I am hoping to remove the work around once the bug is +fixed in L<IPC::Run3>. + =head1 SEE ALSO L<Test::Script::Run>, L<Test::More> -=cut - =head1 AUTHOR Original author: Adam Kennedy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/run_test.pl new/Test-Script-1.12/run_test.pl --- old/Test-Script-1.10/run_test.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Script-1.12/run_test.pl 2016-05-02 17:18:04.000000000 +0200 @@ -0,0 +1,18 @@ +use strict; +use warnings; +use blib; +use Test::Harness; +use File::Spec; +use File::Glob qw( bsd_glob ); + +my $test2 = eval { + require Test2; + require Test2::Suite; + require Test::Builder; + Test::Builder->can('context'); +}; + +my @tests = bsd_glob 't/*.t'; +push @tests, bsd_glob 't2/*.t' if $test2; + +Test::Harness::runtests(@tests); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/00_diag.t new/Test-Script-1.12/t/00_diag.t --- old/Test-Script-1.10/t/00_diag.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/00_diag.t 2016-05-02 17:18:04.000000000 +0200 @@ -2,25 +2,36 @@ use warnings; use Config; use Test::More tests => 1; -BEGIN { - my @modules; - eval q{ - require FindBin; - require File::Spec; + +# This .t file is generated. +# make changes instead to dist.ini + +my %modules; +my $post_diag; + +$modules{$_} = $_ for qw( + ExtUtils::MakeMaker + File::Spec + IPC::Run3 + Probe::Perl + Test::Builder + Test::Builder::Tester + Test::More + Test::Tester +); + +$post_diag = sub +{ + eval { + require Test::Script; + diag "probing IPC::Run3 for rt94685 rt46333 rt95308 gh#9"; + diag "IPC::Run3 is ", Test::Script::_borked_ipc_run3() ? 'borked' : 'good'; 1; - } || die $@; - do { - my $fh; - if(open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.pre.txt'))) - { - @modules = <$fh>; - close $fh; - chomp @modules; - } - }; - eval qq{ require $_ } for @modules; + } || diag "eval failed: $@"; }; +my @modules = sort keys %modules; + sub spacer () { diag ''; @@ -30,15 +41,6 @@ pass 'okay'; -my @modules; -do { - my $fh; - open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.txt')); - @modules = <$fh>; - close $fh; - chomp @modules; -}; - my $max = 1; $max = $_ > $max ? $_ : $max for map { length $_ } @modules; our $format = "%-${max}s %s"; @@ -68,10 +70,7 @@ spacer; } -diag sprintf $format, 'perl ', $^V; - -require(File::Spec->catfile($FindBin::Bin, '00_diag.pl')) - if -e File::Spec->catfile($FindBin::Bin, '00_diag.pl'); +diag sprintf $format, 'perl ', $]; foreach my $module (@modules) { @@ -87,5 +86,11 @@ } } +if($post_diag) +{ + spacer; + $post_diag->(); +} + spacer; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/00_diag.txt new/Test-Script-1.12/t/00_diag.txt --- old/Test-Script-1.10/t/00_diag.txt 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/00_diag.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -ExtUtils::MakeMaker -File::Spec -File::Spec::Functions -IPC::Run3 -Probe::Perl -Test::Builder -Test::Builder::Tester -Test::More -Test::Tester diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/00_diag2.t new/Test-Script-1.12/t/00_diag2.t --- old/Test-Script-1.10/t/00_diag2.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/00_diag2.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -use strict; -use warnings; -use Test::More tests => 1; -use Test::Script; - -pass; - -diag ''; -diag ''; -diag ''; - -diag "probing IPC::Run3 for rt94685 rt46333 rt95308 gh#9"; -diag "IPC::Run3 is ", Test::Script::_borked_ipc_run3() ? 'borked' : 'good'; - -diag ''; -diag ''; - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/02_compiles_good.t new/Test-Script-1.12/t/02_compiles_good.t --- old/Test-Script-1.10/t/02_compiles_good.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/02_compiles_good.t 2016-05-02 17:18:04.000000000 +0200 @@ -20,7 +20,7 @@ test_out("ok 1 - Script t/bin/good.pl compiles"); my $rv = script_compiles('t/bin/good.pl'); test_test('Good script returns true'); - is( $rv, 1, 'script_compiles_ok returns true as a convenience' ); + is( $rv, 1, 'script_compiles returns true as a convenience' ); } SCOPE: { @@ -28,5 +28,5 @@ test_out("ok 1 - It worked"); my $rv = script_compiles('t/bin/good.pl', 'It worked'); test_test('Good script returns true'); - is( $rv, 1, 'script_compiles_ok returns true as a convenience' ); + is( $rv, 1, 'script_compiles returns true as a convenience' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/03_compiles_bad.t new/Test-Script-1.12/t/03_compiles_bad.t --- old/Test-Script-1.10/t/03_compiles_bad.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/03_compiles_bad.t 2016-05-02 17:18:04.000000000 +0200 @@ -28,7 +28,7 @@ test_err("# BEGIN failed--compilation aborted at $bad line 5."); my $rv = script_compiles('t/bin/bad.pl'); test_test('Bad script returns false'); - is( $rv, '', 'script_compiles_ok returns false as a convenience' ); + is( $rv, '', 'script_compiles returns false as a convenience' ); } SCOPE: { @@ -39,5 +39,5 @@ test_err("# BEGIN failed--compilation aborted at $bad line 5."); my $rv = script_compiles('t/bin/bad.pl', 'It worked'); test_test('Bad script returns false'); - is( $rv, '', 'script_compiles_ok returns false as a convenience' ); + is( $rv, '', 'script_compiles returns false as a convenience' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/04_runs_good.t new/Test-Script-1.12/t/04_runs_good.t --- old/Test-Script-1.10/t/04_runs_good.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/04_runs_good.t 2016-05-02 17:18:04.000000000 +0200 @@ -20,7 +20,7 @@ test_out("ok 1 - Script t/bin/good.pl runs"); my $rv = script_runs('t/bin/good.pl'); test_test('Good script returns true'); - is( $rv, 1, 'script_compiles_ok returns true as a convenience' ); + is( $rv, 1, 'script_runs returns true as a convenience' ); } SCOPE: { @@ -28,5 +28,5 @@ test_out("ok 1 - It worked"); my $rv = script_runs('t/bin/good.pl', 'It worked'); test_test('Good script returns true'); - is( $rv, 1, 'script_compiles_ok returns true as a convenience' ); + is( $rv, 1, 'script_runs returns true as a convenience' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t/05_runs_bad.t new/Test-Script-1.12/t/05_runs_bad.t --- old/Test-Script-1.10/t/05_runs_bad.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/t/05_runs_bad.t 2016-05-02 17:18:04.000000000 +0200 @@ -22,7 +22,7 @@ test_err(qr{^# 4 - (?:Using.*\n# )?Standard Error\n?$}); my $rv = script_runs('t/bin/four.pl'); test_test('Bad script returns false'); - is( $rv, '', 'script_compiles_ok returns true as a convenience' ); + is( $rv, '', 'script_runs returns true as a convenience' ); } SCOPE: { @@ -32,5 +32,5 @@ test_err(qr{^# 4 - (?:Using.*\n# )?Standard Error\n?$}); my $rv = script_runs('t/bin/four.pl', 'It worked'); test_test('Bad script returns false'); - is( $rv, '', 'script_compiles_ok returns true as a convenience' ); + is( $rv, '', 'script_runs returns true as a convenience' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t2/test_script__exports.t new/Test-Script-1.12/t2/test_script__exports.t --- old/Test-Script-1.10/t2/test_script__exports.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Script-1.12/t2/test_script__exports.t 2016-05-02 17:18:04.000000000 +0200 @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Test2::Tools::Exports; +use Test2::Tools::Basic; +use Test::Script; + +# replaces t/01_compile.t + +imported_ok $_ for qw( + script_compiles + script_compiles_ok + script_runs + script_stdout_is + script_stdout_isnt + script_stdout_like + script_stdout_unlike + script_stderr_is + script_stderr_isnt + script_stderr_like + script_stderr_unlike +); + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t2/test_script__script_compiles.t new/Test-Script-1.12/t2/test_script__script_compiles.t --- old/Test-Script-1.10/t2/test_script__script_compiles.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Script-1.12/t2/test_script__script_compiles.t 2016-05-02 17:18:04.000000000 +0200 @@ -0,0 +1,117 @@ +use strict; +use warnings; +use Test2::Bundle::Extended; +use Test::Script; +use File::Spec; +use File::Temp qw( tempdir ); + +# the first subtest replaces t/02_compiles_good.t + +subtest 'good' => sub { + + my $rv; + is( + intercept { $rv = script_compiles 't/bin/good.pl' }, + array { + event Ok => sub { + call pass => T(); + call name => 'Script t/bin/good.pl compiles'; + }; + end; + }, + 'script_compiles t/bin/good.pl', + ); + + is $rv, T(), 'script_compiles_ok returns true as convenience'; + + is( + intercept { $rv = script_compiles 't/bin/good.pl', 'It worked' }, + array { + event Ok => sub { + call pass => T(); + call name => 'It worked'; + }; + end; + }, + 'script_compiles t/bin/good.pl It worked', + ); + + is $rv, T(), 'script_compiles_ok returns true as convenience'; +}; + +# second subtest replaces t/03_compiles_bad.t + +subtest 'bad' => sub { + + my $rv; + my $bad = File::Spec->catfile(qw( t bin bad.pl )); + my $qbad = quotemeta($bad); + ok -f $bad, 'found bad script'; + + is( + intercept { $rv = script_compiles 't/bin/bad.pl' }, + array { + event Ok => sub { + call pass => F(); + call name => 'Script t/bin/bad.pl compiles'; + }; + event Diag => sub { + # generated by TB / T2 + }; + event Diag => sub { + # generated by TB / T2 + }; + event Diag => sub { + call message => match qr{\d+ - (?:Using.*\n# )?Bad at $qbad line 4\.\n}; + call message => match qr{BEGIN failed--compilation aborted at $bad line 5.}; + }; + end; + }, + 'script_compiles t/bin/bad.pl', + ); + + is $rv, F(), 'script_compiles_ok returns false as convenience'; + + is( + intercept { $rv = script_compiles 't/bin/bad.pl', 'It worked' }, + array { + event Ok => sub { + call pass => F(); + call name => 'It worked'; + }; + event Diag => sub { + # generated by TB / T2 + }; + event Diag => sub { + # generated by TB / T2 + }; + event Diag => sub { + call message => match qr{\d+ - (?:Using.*\n# )?Bad at $qbad line 4\.\n}; + call message => match qr{BEGIN failed--compilation aborted at $bad line 5.}; + }; + end; + }, + 'script_compiles t/bin/bad.pl It worked', + ); + + is $rv, F(), 'script_compiles_ok returns false as convenience'; + +}; + +subtest 'unreasonable number of libs' => sub { + + local @INC = @INC; + + my $dir = tempdir( CLEANUP => 1 ); + + for(map { File::Spec->catfile($dir, $_) } 1..1000000) + { + #mkdir; + push @INC, $_; + } + + script_compiles 't/bin/good.pl'; + +}; + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/t2/test_script__script_runs.t new/Test-Script-1.12/t2/test_script__script_runs.t --- old/Test-Script-1.10/t2/test_script__script_runs.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Script-1.12/t2/test_script__script_runs.t 2016-05-02 17:18:04.000000000 +0200 @@ -0,0 +1,103 @@ +use strict; +use warnings; +use Test2::Bundle::Extended; +use Test::Script; +use File::Temp qw( tempdir ); + +# the first subtest replaces t/04_runs_good.t + +subtest 'good' => sub { + + my $rv; + + is( + intercept { $rv = script_runs 't/bin/good.pl' }, + array { + event Ok => sub { + call pass => T(); + call name => 'Script t/bin/good.pl runs'; + }; + end; + }, + 'script_runs t/bin/good.pl', + ); + + is $rv, T(), 'script_compiles_ok returns true as convenience'; + + is( + intercept { $rv = script_runs 't/bin/good.pl', 'It worked' }, + array { + event Ok => sub { + call pass => T(); + call name => 'It worked'; + }; + end; + }, + 'script_runs t/bin/good.pl It worked', + ); + + is $rv, T(), 'script_compiles_ok returns true as convenience'; + + +}; + +subtest 'good' => sub { + + my $rv; + + is( + intercept { $rv = script_runs 't/bin/four.pl' }, + array { + event Ok => sub { + call pass => F(); + call name => 'Script t/bin/four.pl runs'; + }; + event Diag => sub {}; + event Diag => sub {}; + event Diag => sub { + call message => match qr{4 - (?:Using.*\n# )?Standard Error\n}; + }; + end; + }, + 'script_runs t/bin/good.pl', + ); + + is $rv, F(), 'script_compiles_ok returns false as convenience'; + + is( + intercept { $rv = script_runs 't/bin/four.pl', 'It worked' }, + array { + event Ok => sub { + call pass => F(); + call name => 'It worked'; + }; + event Diag => sub {}; + event Diag => sub {}; + event Diag => sub { + call message => match qr{4 - (?:Using.*\n# )?Standard Error\n}; + }; + end; + }, + 'script_runs t/bin/good.pl It worked', + ); + + is $rv, F(), 'script_compiles_ok returns false as convenience'; + + +}; + +subtest 'unreasonable number of libs' => sub { + + local @INC = @INC; + my $dir = tempdir( CLEANUP => 1 ); + for(map { File::Spec->catfile($dir, $_) } 1..1000000) + { + #mkdir; + push @INC, $_; + } + + script_runs 't/bin/good.pl'; + +}; + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Script-1.10/xt/release/pod_coverage.t new/Test-Script-1.12/xt/release/pod_coverage.t --- old/Test-Script-1.10/xt/release/pod_coverage.t 2015-05-12 11:15:45.000000000 +0200 +++ new/Test-Script-1.12/xt/release/pod_coverage.t 2016-05-02 17:18:04.000000000 +0200 @@ -2,6 +2,8 @@ use warnings; use Test::More; BEGIN { + plan skip_all => 'test requires 5.010 or better' + unless $] >= 5.010; plan skip_all => 'test requires Test::Pod::Coverage' unless eval q{ use Test::Pod::Coverage; 1 }; plan skip_all => 'test requires YAML'