More tests for magic handling
[gitmo/Mouse.git] / t / 001_mouse / 066-magic.t
index b4460d0..d268ba3 100644 (file)
@@ -1,7 +1,7 @@
 #!perl
 use strict;
 use warnings;
-use Test::More tests => 3;
+use Test::More tests => 6;
 
 use Tie::Scalar;
 
@@ -40,3 +40,11 @@ ts_init $x, 42;
 is(eval{ $o->bar($x) }, 42)
     or diag("Error: $@");
 
+$o = eval{
+    ts_init(my $a, 10);
+    ts_init(my $b, 42);
+    MyClass->new(foo => $a, bar => $b);
+};
+ok $o;
+is eval{ $o->foo }, 10;
+is eval{ $o->bar }, 42;