perl-Package-Stash/Package-Stash-0.20-old-Test::More.patch
Paul Howarth a39aa3c820 Update to 0.20
- New upstream release 0.20
  - Methods were renamed for brevity: s/_package//
  - Convert Package::Stash into a module which loads either the XS or pure perl
    implementation, depending on what's available
  - Use Test::Fatal instead of Test::Exception
  - Use Dist::CheckConflicts
  - Silence deprecation warnings for the method renaming for now
- New script and manpage: package-stash-conflicts
- New modules and manpages: Package::Stash::Conflicts and Package::Stash::PP
- New build requirements:
  - perl(Dist::CheckConflicts)
  - perl(Package::DeprecationManager)
  - perl(Package::Stash::XS)
  - perl(Test::LeakTrace)
  - perl(Test::Requires)
  - perl(Test::Script)
- Update patches for old ExtUtils::MakeMaker and Test::More versions
- Add new patch to work around absence of Test::Requires in EPEL-4
- Require perl(Package::Stash::XS) for performance and consistency
- Manually provide perl(Package::Stash::Conflicts), hidden from auto-provides
2011-01-07 12:09:42 +00:00

295 lines
9.2 KiB
Diff

diff -up Package-Stash-0.20/t/01-basic.t.orig Package-Stash-0.20/t/01-basic.t
--- Package-Stash-0.20/t/01-basic.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/01-basic.t 2011-01-04 16:27:28.114396136 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 122;
use Test::Fatal;
use Package::Stash;
@@ -416,5 +416,3 @@ like(exception {
"list_all_symbols CODE",
);
}
-
-done_testing;
diff -up Package-Stash-0.20/t/02-extension.t.orig Package-Stash-0.20/t/02-extension.t
--- Package-Stash-0.20/t/02-extension.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/02-extension.t 2011-01-04 16:27:28.145397010 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 15;
use Test::Fatal;
{
@@ -70,5 +70,3 @@ is(exception {
}, undef, '... created %Foo::baz successfully');
ok(!defined($Foo::{baz}), '... the %baz slot has still not been created');
-
-done_testing;
diff -up Package-Stash-0.20/t/03-io.t.orig Package-Stash-0.20/t/03-io.t
--- Package-Stash-0.20/t/03-io.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/03-io.t 2011-01-04 16:27:28.145397010 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 11;
use Test::Fatal;
{
@@ -47,5 +47,3 @@ use Package::Stash;
ok($stash->has_symbol('baz'), "has baz");
is($stash->get_symbol('baz'), *Foo::foo{IO}, "got the right baz");
}
-
-done_testing;
diff -up Package-Stash-0.20/t/04-get.t.orig Package-Stash-0.20/t/04-get.t
--- Package-Stash-0.20/t/04-get.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/04-get.t 2011-01-04 16:27:28.146397038 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 36;
use Package::Stash;
use Scalar::Util;
@@ -182,5 +182,3 @@ use Scalar::Util;
"stash has the right variable");
}
}
-
-done_testing;
diff -up Package-Stash-0.20/t/05-isa.t.orig Package-Stash-0.20/t/05-isa.t
--- Package-Stash-0.20/t/05-isa.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/05-isa.t 2011-01-04 16:27:28.146397038 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 1;
use Package::Stash;
@@ -17,6 +17,7 @@ use Package::Stash;
my $stash = Package::Stash->new('Foo');
my @ISA = ('Bar');
@{$stash->get_or_add_symbol('@ISA')} = @ISA;
+SKIP: {
+skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88;
isa_ok('Foo', 'Bar');
-
-done_testing;
+}
diff -up Package-Stash-0.20/t/06-addsub.t.orig Package-Stash-0.20/t/06-addsub.t
--- Package-Stash-0.20/t/06-addsub.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/06-addsub.t 2011-01-04 16:27:28.147397066 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 7;
use Test::Fatal;
BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
@@ -42,5 +42,3 @@ $foo_stash->add_symbol(
is $DB::sub{'Foo::dunk'}, sprintf "%s:%d-%d", "FileName", 100, 199,
'... got the right %DB::sub value for dunk with specified args';
-
-done_testing;
diff -up Package-Stash-0.20/t/07-edge-cases.t.orig Package-Stash-0.20/t/07-edge-cases.t
--- Package-Stash-0.20/t/07-edge-cases.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/07-edge-cases.t 2011-01-04 16:27:28.147397066 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 11;
use Package::Stash;
@@ -51,5 +51,3 @@ is(ref($constant), 'CODE', "expanded a c
# was here)
is(ref($stash->get_symbol('$glob')), '', "nothing yet");
is(ref($stash->get_or_add_symbol('$glob')), 'SCALAR', "got an empty scalar");
-
-done_testing;
diff -up Package-Stash-0.20/t/10-synopsis.t.orig Package-Stash-0.20/t/10-synopsis.t
--- Package-Stash-0.20/t/10-synopsis.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/10-synopsis.t 2011-01-04 16:27:28.147397066 +0000
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 3;
use Package::Stash;
@@ -15,5 +15,3 @@ $stash->add_symbol('%foo', {bar => 1});
ok(!$stash->has_symbol('$foo'), "doesn't have anything in scalar slot");
my $namespace = $stash->namespace;
is_deeply(*{ $namespace->{foo} }{HASH}, {bar => 1}, "namespace works properly");
-
-done_testing;
diff -up Package-Stash-0.20/t/20-leaks.t.orig Package-Stash-0.20/t/20-leaks.t
--- Package-Stash-0.20/t/20-leaks.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/20-leaks.t 2011-01-04 16:28:24.656990649 +0000
@@ -5,6 +5,7 @@ use lib 't/lib';
use Test::More;
use Test::Fatal;
use Test::Requires 'Test::LeakTrace';
+plan tests => 25;
use Package::Stash;
use Symbol;
@@ -136,7 +137,10 @@ use Symbol;
ok($foo->has_symbol('@ISA'));
is(ref($foo->get_symbol('@ISA')), 'ARRAY');
is_deeply($foo->get_symbol('@ISA'), ['Exporter']);
+ SKIP: {
+ skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88;
isa_ok('Foo', 'Exporter');
+ }
}
{
@@ -190,5 +194,3 @@ use Symbol;
eval { $foo->get_or_add_symbol('&blorg') };
} "doesn't leak on errors";
}
-
-done_testing;
diff -up Package-Stash-0.20/t/21-leaks-debug.t.orig Package-Stash-0.20/t/21-leaks-debug.t
--- Package-Stash-0.20/t/21-leaks-debug.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/21-leaks-debug.t 2011-01-04 16:30:26.617430549 +0000
@@ -5,6 +5,7 @@ use lib 't/lib';
use Test::More;
use Test::Fatal;
use Test::Requires 'Test::LeakTrace';
+plan tests => 25;
BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
@@ -138,7 +139,10 @@ use Symbol;
ok($foo->has_symbol('@ISA'));
is(ref($foo->get_symbol('@ISA')), 'ARRAY');
is_deeply($foo->get_symbol('@ISA'), ['Exporter']);
+ SKIP: {
+ skip "Test::More >= 0.88 needed for isa_ok() tests on classes", 1 if $Test::More::VERSION < 0.88;
isa_ok('Foo', 'Exporter');
+ }
}
{
@@ -192,5 +196,3 @@ use Symbol;
eval { $foo->get_or_add_symbol('&blorg') };
} "doesn't leak on errors";
}
-
-done_testing;
diff -up Package-Stash-0.20/t/impl-selection/01-choice.t.orig Package-Stash-0.20/t/impl-selection/01-choice.t
--- Package-Stash-0.20/t/impl-selection/01-choice.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/impl-selection/01-choice.t 2011-01-04 16:27:28.149397123 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 2;
my $has_xs = eval "require Package::Stash::XS; 1";
@@ -13,5 +13,3 @@ my $expected = $has_xs ? 'XS' : 'PP';
is($Package::Stash::IMPLEMENTATION, $expected,
"autodetected properly: $expected");
can_ok('Package::Stash', 'new');
-
-done_testing;
diff -up Package-Stash-0.20/t/impl-selection/02-env.t.orig Package-Stash-0.20/t/impl-selection/02-env.t
--- Package-Stash-0.20/t/impl-selection/02-env.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/impl-selection/02-env.t 2011-01-04 16:27:28.149397123 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 4;
# XXX: work around dumb core segfault bug when you delete stashes
sub get_impl { eval '$Package::Stash::IMPLEMENTATION' }
@@ -25,5 +25,3 @@ SKIP: {
is(get_impl, 'XS', "autodetected properly: XS");
can_ok('Package::Stash', 'new');
}
-
-done_testing;
diff -up Package-Stash-0.20/t/impl-selection/03-var.t.orig Package-Stash-0.20/t/impl-selection/03-var.t
--- Package-Stash-0.20/t/impl-selection/03-var.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/impl-selection/03-var.t 2011-01-04 16:27:28.150397151 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 4;
# XXX: work around dumb core segfault bug when you delete stashes
sub get_impl { eval '$Package::Stash::IMPLEMENTATION' }
@@ -25,5 +25,3 @@ SKIP: {
is(get_impl, 'XS', "autodetected properly: XS");
can_ok('Package::Stash', 'new');
}
-
-done_testing;
diff -up Package-Stash-0.20/t/impl-selection/10-basic-pp.t.orig Package-Stash-0.20/t/impl-selection/10-basic-pp.t
--- Package-Stash-0.20/t/impl-selection/10-basic-pp.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/impl-selection/10-basic-pp.t 2011-01-04 16:27:28.150397151 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 124;
use Test::Fatal;
BEGIN { $Package::Stash::IMPLEMENTATION = 'PP' }
@@ -420,5 +420,3 @@ like(exception {
"list_all_symbols CODE",
);
}
-
-done_testing;
diff -up Package-Stash-0.20/t/impl-selection/11-basic-xs.t.orig Package-Stash-0.20/t/impl-selection/11-basic-xs.t
--- Package-Stash-0.20/t/impl-selection/11-basic-xs.t.orig 2011-01-03 19:48:16.000000000 +0000
+++ Package-Stash-0.20/t/impl-selection/11-basic-xs.t 2011-01-04 16:27:28.151397179 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 124;
use Test::Fatal;
use Test::Requires 'Package::Stash::XS';
@@ -421,5 +421,3 @@ like(exception {
"list_all_symbols CODE",
);
}
-
-done_testing;