perl-Package-Stash/Package-Stash-0.32-old-Test::More.patch
Paul Howarth 1a294d28ce Update to 0.32
- New upstream release 0.32
  - Bring the behavior of has_symbol for nonexistant scalars into line with the
    XS version
  - Invalid package names (for instance, Foo:Bar) are not allowed
  - Invalid stash entry names (anything containing ::) are not allowed
- Update patches to apply cleanly
- Bump perl(Package::Stash::XS) version requirement to 0.24
2011-09-06 20:29:32 +01:00

364 lines
11 KiB
Diff

diff -up Package-Stash-0.32/t/addsub.t.orig Package-Stash-0.32/t/addsub.t
--- Package-Stash-0.32/t/addsub.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/addsub.t 2011-09-06 12:32:22.277728975 +0100
@@ -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.32/t/author-leaks-debug.t.orig Package-Stash-0.32/t/author-leaks-debug.t
--- Package-Stash-0.32/t/author-leaks-debug.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/author-leaks-debug.t 2011-09-06 12:32:22.341728808 +0100
@@ -14,6 +14,8 @@ use Test::More;
use Test::Fatal;
use Test::LeakTrace;
+plan tests => 29;
+
BEGIN { $^P |= 0x210 } # PERLDBf_SUBLINE
use Package::Stash;
@@ -154,7 +156,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');
+ }
}
{
@@ -208,5 +213,3 @@ use Symbol;
eval { $foo->get_or_add_symbol('&blorg') };
} "doesn't leak on errors";
}
-
-done_testing;
diff -up Package-Stash-0.32/t/author-leaks.t.orig Package-Stash-0.32/t/author-leaks.t
--- Package-Stash-0.32/t/author-leaks.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/author-leaks.t 2011-09-06 12:32:22.294728930 +0100
@@ -14,6 +14,8 @@ use Test::More;
use Test::Fatal;
use Test::LeakTrace;
+plan tests => 29;
+
use Package::Stash;
use Symbol;
@@ -152,7 +154,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');
+ }
}
{
@@ -206,5 +211,3 @@ use Symbol;
eval { $foo->get_or_add_symbol('&blorg') };
} "doesn't leak on errors";
}
-
-done_testing;
diff -up Package-Stash-0.32/t/basic.t.orig Package-Stash-0.32/t/basic.t
--- Package-Stash-0.32/t/basic.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/basic.t 2011-09-06 12:32:53.015648488 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 129;
use Test::Fatal;
use Package::Stash;
@@ -436,5 +436,3 @@ like(
qr/^Package::Stash->new must be passed the name of the package to access/,
"module name must be a string"
);
-
-done_testing;
diff -up Package-Stash-0.32/t/compile-time.t.orig Package-Stash-0.32/t/compile-time.t
--- Package-Stash-0.32/t/compile-time.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/compile-time.t 2011-09-06 12:32:22.342728805 +0100
@@ -2,8 +2,6 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 1;
use_ok('CompileTime');
-
-done_testing;
diff -up Package-Stash-0.32/t/edge-cases.t.orig Package-Stash-0.32/t/edge-cases.t
--- Package-Stash-0.32/t/edge-cases.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/edge-cases.t 2011-09-06 12:32:22.342728805 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 11;
use Test::Fatal;
use Package::Stash;
@@ -52,5 +52,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.32/t/extension.t.orig Package-Stash-0.32/t/extension.t
--- Package-Stash-0.32/t/extension.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/extension.t 2011-09-06 12:32:22.343728802 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 15;
use Test::Fatal;
{
@@ -72,5 +72,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.32/t/get.t.orig Package-Stash-0.32/t/get.t
--- Package-Stash-0.32/t/get.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/get.t 2011-09-06 12:32:22.343728802 +0100
@@ -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.32/t/impl-selection/basic-pp.t.orig Package-Stash-0.32/t/impl-selection/basic-pp.t
--- Package-Stash-0.32/t/impl-selection/basic-pp.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/impl-selection/basic-pp.t 2011-09-06 12:32:22.344728799 +0100
@@ -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.32/t/impl-selection/basic-xs.t.orig Package-Stash-0.32/t/impl-selection/basic-xs.t
--- Package-Stash-0.32/t/impl-selection/basic-xs.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/impl-selection/basic-xs.t 2011-09-06 12:32:22.344728799 +0100
@@ -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;
diff -up Package-Stash-0.32/t/impl-selection/choice.t.orig Package-Stash-0.32/t/impl-selection/choice.t
--- Package-Stash-0.32/t/impl-selection/choice.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/impl-selection/choice.t 2011-09-06 12:32:22.345728796 +0100
@@ -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.32/t/impl-selection/env.t.orig Package-Stash-0.32/t/impl-selection/env.t
--- Package-Stash-0.32/t/impl-selection/env.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/impl-selection/env.t 2011-09-06 12:32:22.345728796 +0100
@@ -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.32/t/impl-selection/var.t.orig Package-Stash-0.32/t/impl-selection/var.t
--- Package-Stash-0.32/t/impl-selection/var.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/impl-selection/var.t 2011-09-06 12:32:22.346728793 +0100
@@ -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.32/t/io.t.orig Package-Stash-0.32/t/io.t
--- Package-Stash-0.32/t/io.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/io.t 2011-09-06 12:32:22.346728793 +0100
@@ -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.32/t/isa.t.orig Package-Stash-0.32/t/isa.t
--- Package-Stash-0.32/t/isa.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/isa.t 2011-09-06 12:32:22.346728793 +0100
@@ -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.32/t/paamayim_nekdotayim.t.orig Package-Stash-0.32/t/paamayim_nekdotayim.t
--- Package-Stash-0.32/t/paamayim_nekdotayim.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/paamayim_nekdotayim.t 2011-09-06 12:33:52.822495894 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 3;
use Test::Fatal;
use Package::Stash;
@@ -24,5 +24,3 @@ like(
qr/^Variable names may not contain ::/,
"can't add symbol with ::"
);
-
-done_testing;
diff -up Package-Stash-0.32/t/scalar-values.t.orig Package-Stash-0.32/t/scalar-values.t
--- Package-Stash-0.32/t/scalar-values.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/scalar-values.t 2011-09-06 12:32:22.347728790 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 14;
use Test::Fatal;
use B;
@@ -49,5 +49,3 @@ my $vstring = v1.2.3;
is(reftype(\$vstring), ($] < 5.010 ? 'SCALAR' : 'VSTRING'));
is(exception { $Bar->add_symbol('$vstring', \$vstring) }, undef,
"can add vstring values");
-
-done_testing;
diff -up Package-Stash-0.32/t/stash-deletion.t.orig Package-Stash-0.32/t/stash-deletion.t
--- Package-Stash-0.32/t/stash-deletion.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/stash-deletion.t 2011-09-06 12:32:22.347728790 +0100
@@ -2,7 +2,7 @@
use strict;
use warnings;
use lib 't/lib';
-use Test::More;
+use Test::More tests => 2;
use Package::Stash;
@@ -20,5 +20,3 @@ use Package::Stash;
}
ok(!$delete->has_symbol('&bar'), "method goes away when stash is deleted");
}
-
-done_testing;
diff -up Package-Stash-0.32/t/synopsis.t.orig Package-Stash-0.32/t/synopsis.t
--- Package-Stash-0.32/t/synopsis.t.orig 2011-09-06 04:23:06.000000000 +0100
+++ Package-Stash-0.32/t/synopsis.t 2011-09-06 12:32:22.348728788 +0100
@@ -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;