summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2013-10-13 17:47:05 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2013-10-13 17:47:05 +0100
commitaa86db36e6778689f4a9d13c9af25e2020f46bf4 (patch)
tree926e93b5709b22080b967755cca98d3c969b29a4 /dist
parent52102bb4f956712224c10b76771f133d3fbbb803 (diff)
downloadperl-aa86db36e6778689f4a9d13c9af25e2020f46bf4.tar.gz
Fix autouse test, failing since commit 52102bb4f9
Only running test_porting and the tests of the module upgraded clearly isn't always enough :-/
Diffstat (limited to 'dist')
-rw-r--r--dist/autouse/t/autouse.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/dist/autouse/t/autouse.t b/dist/autouse/t/autouse.t
index 786a8a988f..599399424e 100644
--- a/dist/autouse/t/autouse.t
+++ b/dist/autouse/t/autouse.t
@@ -13,24 +13,24 @@ use Test::More tests => 15;
BEGIN {
require autouse;
eval {
- "autouse"->import('List::Util' => 'List::Util::first(&@)');
+ "autouse"->import('Scalar::Util' => 'Scalar::Util::set_prototype(&$)');
};
ok( !$@ );
eval {
- "autouse"->import('List::Util' => 'Foo::min');
+ "autouse"->import('Scalar::Util' => 'Foo::min');
};
ok( $@, qr/^autouse into different package attempted/ );
- "autouse"->import('List::Util' => qw(max first(&@)));
+ "autouse"->import('Scalar::Util' => qw(isdual set_prototype(&$)));
}
-my @a = (1,2,3,4,5.5);
-is( max(@a), 5.5);
+ok( isdual($!) );
-# first() has a prototype of &@. Make sure that's preserved.
-is( (first { $_ > 3 } @a), 4);
+# set_prototype() has a prototype of &$. Make sure that's preserved.
+sub sum { return $_[0] + $_[1] };
+is( (set_prototype \&sum, '$$'), \&sum);
# Example from the docs.