From f550f1f84120b52f9da4c1bccd557ed73c676650 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 2 Feb 2006 20:57:01 +0000 Subject: [PATCH] It would be nice to have tests in B for the functions getting changed. p4raw-id: //depot/perl@27057 --- ext/B/t/b.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 1.8.3.1