Permalink
Browse files

Test for redefine warnings in alias()

  • Loading branch information...
1 parent 2e5ccb2 commit 6a716e9c70cfe87e0d990f6edba9a87ab3a55a0c @doherty committed Apr 28, 2011
Showing with 11 additions and 2 deletions.
  1. +11 −2 t/alias.t
View
@@ -3,7 +3,7 @@
use perl5i::latest;
use Test::More;
-
+use Test::Warn;
# Test name construction
{
@@ -75,4 +75,13 @@ use Test::More;
}
-done_testing();
+# No redefine warnings:
+{
+ sub egg { 42 }
+ sub ham { 10 }
+ warning_is {
+ (\&egg)->alias('ham');
+ } undef, 'no warning';
+}
+
+done_testing;

0 comments on commit 6a716e9

Please sign in to comment.