From: Steve Peters Date: Thu, 2 Feb 2006 20:57:01 +0000 (+0000) Subject: It would be nice to have tests in B for the functions getting changed. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f550f1f84120b52f9da4c1bccd557ed73c676650;p=p5sagit%2Fp5-mst-13.2.git It would be nice to have tests in B for the functions getting changed. p4raw-id: //depot/perl@27057 --- diff --git a/ext/B/t/b.t b/ext/B/t/b.t index 4337109..12e9092 100755 --- a/ext/B/t/b.t +++ b/ext/B/t/b.t @@ -22,7 +22,7 @@ BEGIN { $| = 1; use warnings; use strict; -use Test::More tests => 53; +use Test::More tests => 55; BEGIN { use_ok( 'B' ); } @@ -74,6 +74,8 @@ ok( B::svref_2object(\$.)->MAGIC->TYPE eq "\0", '$. has \0 magic' ); '$. has no more magic' ); } +ok(B::svref_2object(qr/foo/)->MAGIC->precomp() eq 'foo', 'Get string from qr//'); +like(B::svref_2object(qr/foo/)->MAGIC->REGEX(), qr/\d+/, "REGEX() returns numeric value"); my $iv = 1; my $iv_ref = B::svref_2object(\$iv); is(ref $iv_ref, "B::IV", "Test B:IV return from svref_2object");