From: gfx Date: Wed, 7 Oct 2009 05:41:20 +0000 (+0900) Subject: Add a regression test X-Git-Tag: 0.37_03~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e24a2c7c1a939c30462a9a301147fe59dca9cd6;p=gitmo%2FMouse.git Add a regression test --- diff --git a/t/990_deprecated/001-export_to_level.t b/t/990_deprecated/001-export_to_level.t new file mode 100644 index 0000000..e14ab10 --- /dev/null +++ b/t/990_deprecated/001-export_to_level.t @@ -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)";