Hello community, here is the log from the commit of package perl-Test-Spec for openSUSE:Factory checked in at 2012-03-12 08:53:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-Spec (Old) and /work/SRC/openSUSE:Factory/.perl-Test-Spec.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Spec", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-Spec/perl-Test-Spec.changes 2012-02-16 15:00:43.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Test-Spec.new/perl-Test-Spec.changes 2012-03-12 08:54:02.000000000 +0100 @@ -1,0 +2,9 @@ +Fri Mar 9 14:05:28 UTC 2012 - [email protected] + +- updated to 0.42 + - Added context() and xcontext() aliases for describe/xdescribe + (reported by intrigeri) + - Added license info to Makefile.PL (RT#75400) + - Fixed test suite problems on Windows + +------------------------------------------------------------------- Old: ---- Test-Spec-0.40.tar.gz New: ---- Test-Spec-0.42.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-Spec.spec ++++++ --- /var/tmp/diff_new_pack.94bYcr/_old 2012-03-12 08:54:03.000000000 +0100 +++ /var/tmp/diff_new_pack.94bYcr/_new 2012-03-12 08:54:03.000000000 +0100 @@ -17,11 +17,11 @@ Name: perl-Test-Spec -Version: 0.40 +Version: 0.42 Release: 0 %define cpan_name Test-Spec Summary: Write tests in a declarative specification style -License: GPL-1.0+ or Artistic-1.0 +License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Test-Spec/ Source: http://www.cpan.org/authors/id/P/PH/PHILIP/%{cpan_name}-%{version}.tar.gz ++++++ Test-Spec-0.40.tar.gz -> Test-Spec-0.42.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/Changes new/Test-Spec-0.42/Changes --- old/Test-Spec-0.40/Changes 2012-01-31 00:43:31.000000000 +0100 +++ new/Test-Spec-0.42/Changes 2012-03-06 04:21:04.000000000 +0100 @@ -1,5 +1,13 @@ Revision history for Perl extension Test::Spec. +0.42 Mon Mar 05 21:18:00 CST 2012 + - Added context() and xcontext() aliases for describe/xdescribe + (reported by intrigeri) + +0.41 Sat Mar 03 19:04:00 EST 2012 + - Added license info to Makefile.PL (RT #75400) + - Fixed test suite problems on Windows + 0.40 Mon Jan 30 18:38:00 EST 2012 - Fixed problem that caused Test::Spec usage errors (e.g. 'describe "foo";' without a subroutine argument) to be reported from inside the library, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/META.yml new/Test-Spec-0.42/META.yml --- old/Test-Spec-0.40/META.yml 2012-01-31 00:44:24.000000000 +0100 +++ new/Test-Spec-0.42/META.yml 2012-03-06 04:21:16.000000000 +0100 @@ -1,10 +1,10 @@ --- #YAML:1.0 name: Test-Spec -version: 0.40 +version: 0.42 abstract: Write tests in a declarative specification style author: - Philip Garrett <[email protected]> -license: unknown +license: perl distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/Makefile.PL new/Test-Spec-0.42/Makefile.PL --- old/Test-Spec-0.40/Makefile.PL 2011-06-13 17:27:54.000000000 +0200 +++ new/Test-Spec-0.42/Makefile.PL 2012-03-04 01:06:07.000000000 +0100 @@ -21,4 +21,5 @@ ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Test/Spec.pm', # retrieve abstract from module AUTHOR => 'Philip Garrett <[email protected]>') : ()), + LICENSE => 'perl', ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/lib/Test/Spec.pm new/Test-Spec-0.42/lib/Test/Spec.pm --- old/Test-Spec-0.40/lib/Test/Spec.pm 2012-01-31 00:43:31.000000000 +0100 +++ new/Test-Spec-0.42/lib/Test/Spec.pm 2012-03-06 04:21:04.000000000 +0100 @@ -3,7 +3,7 @@ use warnings; use Test::Trap (); # load as early as possible to override CORE::exit -our $VERSION = '0.40'; +our $VERSION = '0.42'; use base qw(Exporter); @@ -17,9 +17,10 @@ our $TODO; our $Debug = $ENV{TEST_SPEC_DEBUG} || 0; -our @EXPORT = qw(runtests describe xdescribe before after it xit they - xthey *TODO share shared_examples_for it_should_behave_like - spec_helper); +our @EXPORT = qw(runtests + describe xdescribe context xcontext it xit they xthey + before after spec_helper + *TODO share shared_examples_for it_should_behave_like ); our @EXPORT_OK = ( @EXPORT, qw(DEFINITION_PHASE EXECUTION_PHASE $Debug) ); our %EXPORT_TAGS = ( all => \@EXPORT_OK, constants => [qw(DEFINITION_PHASE EXECUTION_PHASE)] ); @@ -210,6 +211,10 @@ }); } +# make context() an alias for describe() +sub context(@); +BEGIN { *context = \&describe } + # used to easily disable suites/specs during development sub xit(@) { local $TODO = '(disabled)'; @@ -226,6 +231,10 @@ describe(@_); } +# make xcontext() an alias for xdescribe() +sub xcontext(@); +BEGIN { *xcontext = \&xdescribe } + # shared_examples_for DESC => CODE sub shared_examples_for($&) { my $package = caller; @@ -624,13 +633,21 @@ other, rather subsequent C<describe>s extend the existing one of the same name. +=item context + +An alias for C<describe()>. + =item xdescribe Specification contexts may be disabled by calling C<xdescribe> instead of -describe(). All examples inside an C<xdescribe> are reported as +C<describe()>. All examples inside an C<xdescribe> are reported as "# TODO (disabled)", which prevents Test::Harness/prove from counting them as failures. +=item xcontext + +An alias for C<xdescribe()>. + =item it SPECIFICATION => CODE =item it CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/another_shared_examples_spec.pl new/Test-Spec-0.42/t/another_shared_examples_spec.pl --- old/Test-Spec-0.40/t/another_shared_examples_spec.pl 2011-07-07 19:56:53.000000000 +0200 +++ new/Test-Spec-0.42/t/another_shared_examples_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -11,6 +11,8 @@ # package Testcase::Spec::AnotherSharedExamplesSpec; use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; spec_helper 'shared_examples_spec.pl'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/define.t new/Test-Spec-0.42/t/define.t --- old/Test-Spec-0.40/t/define.t 2011-06-05 20:25:35.000000000 +0200 +++ new/Test-Spec-0.42/t/define.t 2012-03-06 04:21:00.000000000 +0100 @@ -81,12 +81,12 @@ }; }; - describe "Outer 1" => sub { + context "Outer 1" => sub { $outer++; - describe "Inner 1" => sub { + context "Inner 1" => sub { $inner++; }; - describe "Inner 2" => sub { + context "Inner 2" => sub { }; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/disabled_spec.pl new/Test-Spec-0.42/t/disabled_spec.pl --- old/Test-Spec-0.40/t/disabled_spec.pl 2011-08-31 06:57:00.000000000 +0200 +++ new/Test-Spec-0.42/t/disabled_spec.pl 2012-03-06 04:21:00.000000000 +0100 @@ -9,6 +9,8 @@ package Testcase::Spec::Disabled; use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; describe 'Test::Spec' => sub { xdescribe 'disabled spec' => sub { @@ -19,6 +21,12 @@ fail; }; }; + + xcontext "disabled spec 2" => sub { + it 'should not execute "it" examples' => sub { + fail; + }; + }; xit 'should not execute disabled "it" example' => sub { fail; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/dying_spec.pl new/Test-Spec-0.42/t/dying_spec.pl --- old/Test-Spec-0.40/t/dying_spec.pl 2011-06-05 20:25:35.000000000 +0200 +++ new/Test-Spec-0.42/t/dying_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -9,6 +9,8 @@ # use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; describe "Test::Spec" => sub { it "should trap die message" => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/perl_warning_spec.pl new/Test-Spec-0.42/t/perl_warning_spec.pl --- old/Test-Spec-0.40/t/perl_warning_spec.pl 2011-06-05 20:24:37.000000000 +0200 +++ new/Test-Spec-0.42/t/perl_warning_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -8,6 +8,8 @@ ######################################################################## use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; describe "Test::Spec" => sub { it "turns on perl warnings in test file" => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/shared_examples_spec.pl new/Test-Spec-0.42/t/shared_examples_spec.pl --- old/Test-Spec-0.40/t/shared_examples_spec.pl 2011-07-07 19:28:12.000000000 +0200 +++ new/Test-Spec-0.42/t/shared_examples_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -9,6 +9,8 @@ # package Testcase::Spec::SharedExamplesSpec; use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; shared_examples_for "example group" => sub { it "can take at least one example"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/strict_violating_spec.pl new/Test-Spec-0.42/t/strict_violating_spec.pl --- old/Test-Spec-0.40/t/strict_violating_spec.pl 2011-06-05 20:24:37.000000000 +0200 +++ new/Test-Spec-0.42/t/strict_violating_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -7,6 +7,8 @@ ######################################################################## use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; $undefined_variable_violates_strict_mode_and_test_should_not_compile; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/test_helper.pl new/Test-Spec-0.42/t/test_helper.pl --- old/Test-Spec-0.40/t/test_helper.pl 2011-06-29 18:53:53.000000000 +0200 +++ new/Test-Spec-0.42/t/test_helper.pl 2012-03-04 01:06:07.000000000 +0100 @@ -1,6 +1,17 @@ use strict; use FindBin qw($Bin); +# +# Shim to make Win32 behave during the test suite. +# +# Using fork+exec causes an APPCRASH during show_exceptions.t. Simply +# reopening STDOUT and STDERR to the same duped filehandle causes errors in +# the output where STDOUT and STDERR are written on top of each other (even +# when autoflush is turned on). Reopening STDERR on top of STDOUT in the child +# process seems to fix this problem. +open(STDERR, ">&STDOUT") || die "can't reopen STDERR on STDOUT: $!"; + + { package SpecStub; sub new { bless do { \my $stub }, shift() } @@ -25,16 +36,24 @@ require File::Spec; require File::Temp; - my ($fh,$filename) = File::Temp::tempfile('tmpfileXXXXXX', UNLINK => 1, TMPDIR => 1); - my $pid = fork || do { - STDOUT->fdopen(fileno($fh), "w") || die "can't reopen stdout: $!"; - STDERR->fdopen(fileno($fh), "w") || die "can't reopen stderr: $!"; - exec($^X, (map { "-I$_" } @INC), File::Spec->catfile($Bin, $spec_name)); - die "couldn't exec '$spec_name'"; + my ($fh,$filename) = File::Temp::tempfile('tmpfileXXXXXX', TMPDIR => 1); + close($fh); + + open my $oldout, ">&STDOUT" or die "can't dup stdout: $!"; + open my $olderr, ">&STDERR" or die "can't dup stderr: $!"; + open(STDOUT, ">", $filename) || die "can't open '$filename' for out: $!"; + open(STDERR, ">&STDOUT") || die "can't reopen stderr on stdout: $!"; + + system($^X, (map { "-I$_" } @INC), File::Spec->catfile($Bin, $spec_name)); + + open(STDERR, ">&", $olderr) || do { + print {$olderr} "can't reopen stderr: $! " . "at " . __FILE__ . " line " . __LINE__ . "\n"; + exit(1); }; - waitpid($pid,0); - seek($fh, 0, 0); + open(STDOUT, ">&", $oldout) || die "can't reopen stdout: $!"; + open($fh, "<", $filename) || die "can't open '$filename' for read: $!"; my $tap = do { local $/; <$fh> }; + unlink($filename) || warn "can't unlink '$filename': $!"; return $tap; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Spec-0.40/t/uncompilable_spec.pl new/Test-Spec-0.42/t/uncompilable_spec.pl --- old/Test-Spec-0.40/t/uncompilable_spec.pl 2012-01-31 00:43:24.000000000 +0100 +++ new/Test-Spec-0.42/t/uncompilable_spec.pl 2012-03-04 01:06:07.000000000 +0100 @@ -9,6 +9,8 @@ # use Test::Spec; +use FindBin qw($Bin); +BEGIN { require "$Bin/test_helper.pl" }; describe "Test::Spec"; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
