This is an automatically generated mail to inform you that tests are now
available in t/spec/S10-packages/use-with-class.t
commit d8944e8b6eac93f4cace32bbc6588b0d323b0320
Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64>
Date: Fri Apr 30 19:33:41 2010 +0000
[t/spec] Test for RT #73886, loading a class from inside a method
git-svn-id: http://svn.pugscode.org/p...@30527
c213334d-75ef-0310-aa23-eaa082d1ae64
diff --git a/t/spec/S10-packages/use-with-class.t
b/t/spec/S10-packages/use-with-class.t
index e2b7801..ec664bf 100644
--- a/t/spec/S10-packages/use-with-class.t
+++ b/t/spec/S10-packages/use-with-class.t
@@ -5,7 +5,7 @@ use Test;
# L<S11/Compile-time Importation>
-plan 7;
+plan 8;
# test that 'use' imports class names defined in importet packages
@@ -32,4 +32,18 @@ eval_lives_ok 'Stupid::Class.new()', 'can instantiate object
of "imported" class
}
+# class loading inside a method
+# RT #73886
+{
+ BEGIN { @*INC.push: 't/spec/packages' }
+ class MethodLoadingTest {
+ method doit {
+ use Foo;
+ Foo.new.foo();
+ }
+ }
+ is MethodLoadingTest.doit(), 'foo', 'can load class from inside a method';
+
+}
+
# vim: ft=perl6