Add a DB::sub test to xt/
gfx [Tue, 9 Feb 2010 06:12:59 +0000 (15:12 +0900)]
xt/05_dbsub.t [new file with mode: 0644]

diff --git a/xt/05_dbsub.t b/xt/05_dbsub.t
new file mode 100644 (file)
index 0000000..a6ae6fe
--- /dev/null
@@ -0,0 +1,22 @@
+#!perl -w
+BEGIN{ $^P = 0x10 | 0x200 }
+use Test::More;
+
+sub DB::DB {}
+
+{
+    package Foo;
+    use Mouse;
+
+    __PACKAGE__->meta->add_method(bar => sub{ __LINE__ });
+}
+
+if(Mouse::Util::MOUSE_XS){
+is $DB::sub{'Foo::bar'}, sprintf('%s:%d-%d', __FILE__, Foo->bar, Foo->bar),
+    '%DB::sub updated';
+}
+else{
+    pass 'under Mouse::PurePerl';
+}
+
+done_testing;