Add tests for wrapping formats in B objects
authorFlorian Ragwitz <rafl@debian.org>
Mon, 11 Jul 2011 19:55:44 +0000 (21:55 +0200)
committerFlorian Ragwitz <rafl@debian.org>
Mon, 11 Jul 2011 19:56:18 +0000 (21:56 +0200)
ext/B/t/b.t

index c4fb633..71e0538 100644 (file)
@@ -295,4 +295,13 @@ is(B::svref_2object(sub {})->ROOT->ppaddr, 'PL_ppaddr[OP_LEAVESUB]',
 B::svref_2object(sub{y/\x{100}//})->ROOT->first->first->sibling->sv;
 ok 1, 'B knows that UTF trans is a padop in 5.8.9, not an svop';
 
+{
+    format FOO =
+foo
+.
+    my $f = B::svref_2object(*FOO{FORMAT});
+    isa_ok $f, 'B::FM';
+    can_ok $f, 'LINES';
+}
+
 done_testing();