Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test for redefine warnings in alias()

  • Loading branch information...
commit 6a716e9c70cfe87e0d990f6edba9a87ab3a55a0c 1 parent 2e5ccb2
@doherty authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 t/alias.t
View
13 t/alias.t
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.