- fix build on distributions with old Test::More module

( perl-Eval-Closure-old_Test-More.patch )

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Eval-Closure?expand=0&rev=4
This commit is contained in:
Lars Vogdt 2011-06-04 18:58:04 +00:00 committed by Git OBS Bridge
parent dc601d1f9b
commit 1b0e0c33d9
3 changed files with 144 additions and 1 deletions

View File

@ -0,0 +1,133 @@
Index: Eval-Closure-0.05/t/01-basic.t
===================================================================
--- Eval-Closure-0.05.orig/t/01-basic.t
+++ Eval-Closure-0.05/t/01-basic.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
use Eval::Closure;
@@ -45,4 +45,4 @@ use Eval::Closure;
ok(!$code->(), "environment is clean");
}
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/02-close-over.t
===================================================================
--- Eval-Closure-0.05.orig/t/02-close-over.t
+++ Eval-Closure-0.05/t/02-close-over.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
use Eval::Closure;
@@ -52,4 +52,4 @@ use Test::Requires 'PadWalker';
# it'd be nice if we could test that closing over other things wasn't possible,
# but perl's optimizer gets in the way of that
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/03-description.t
===================================================================
--- Eval-Closure-0.05.orig/t/03-description.t
+++ Eval-Closure-0.05/t/03-description.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
use Eval::Closure;
@@ -50,4 +50,4 @@ SOURCE
"description is set"
);
}
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/04-canonicalize-source.t
===================================================================
--- Eval-Closure-0.05.orig/t/04-canonicalize-source.t
+++ Eval-Closure-0.05/t/04-canonicalize-source.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Eval::Closure;
@@ -28,4 +28,4 @@ use Eval::Closure;
is($code->(), "foo", "got the right code");
}
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/05-memoize.t
===================================================================
--- Eval-Closure-0.05.orig/t/05-memoize.t
+++ Eval-Closure-0.05/t/05-memoize.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
use Test::Requires 'Test::Output';
@@ -99,4 +99,4 @@ use Eval::Closure;
"got the right description");
}
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/10-errors.t
===================================================================
--- Eval-Closure-0.05.orig/t/10-errors.t
+++ Eval-Closure-0.05/t/10-errors.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
use Eval::Closure;
@@ -64,4 +64,4 @@ unlike(
"with terse_error, does not include the source code"
);
-done_testing;
+#done_testing;
Index: Eval-Closure-0.05/t/11-debugger.t
===================================================================
--- Eval-Closure-0.05.orig/t/11-debugger.t
+++ Eval-Closure-0.05/t/11-debugger.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More qw(no_plan);
use Test::Fatal;
BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
@@ -20,4 +20,4 @@ unlike(
);
-done_testing;
+#done_testing;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jun 4 18:30:04 UTC 2011 - lars@linux-schulserver.de
- fix build on distributions with old Test::More module
( perl-Eval-Closure-old_Test-More.patch )
-------------------------------------------------------------------
Wed May 4 10:55:03 UTC 2011 - coolo@opensuse.org

View File

@ -22,10 +22,11 @@ Version: 0.05
Release: 1
License: GPL+ or Artistic
%define cpan_name Eval-Closure
Summary: safely and cleanly create closures via string eval
Summary: Safely and cleanly create closures via string eval
Url: http://search.cpan.org/dist/Eval-Closure/
Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/D/DO/DOY/%{cpan_name}-%{version}.tar.gz
Patch1: perl-Eval-Closure-old_Test-More.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
@ -59,6 +60,9 @@ non-existent) if caching is to work properly).
%prep
%setup -q -n %{cpan_name}-%{version}
%if 0%{?suse_version} >= 1110
%patch1 -p1
%endif
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor