Add a regression test
gfx [Wed, 7 Oct 2009 05:41:20 +0000 (14:41 +0900)]
t/990_deprecated/001-export_to_level.t [new file with mode: 0644]

diff --git a/t/990_deprecated/001-export_to_level.t b/t/990_deprecated/001-export_to_level.t
new file mode 100644 (file)
index 0000000..e14ab10
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN{
+    package Foo;
+    use Mouse;
+
+    sub import{
+        shift;
+        Mouse->export_to_level(1, @_);
+    }
+    $INC{'Foo.pm'}++;
+}
+
+package A;
+use Test::More;
+
+use Foo qw(has);
+
+ok defined(&has), "export_to_level (DEPRECATED)";
+
+
+ok!defined(&Bar::has), "export (DEPRECATED)";
+Mouse->export('Bar', 'has');
+ok defined(&Bar::has), "export (DEPRECATED)";