Change 34132 by [EMAIL PROTECTED] on 2008/07/12 07:12:37
Test that formats can be dumped.
Affected files ...
... //depot/perl/ext/Devel/Peek/t/Peek.t#44 edit
Differences ...
==== //depot/perl/ext/Devel/Peek/t/Peek.t#44 (text) ====
Index: perl/ext/Devel/Peek/t/Peek.t
--- perl/ext/Devel/Peek/t/Peek.t#43~33226~ 2008-02-03 06:41:05.000000000
-0800
+++ perl/ext/Devel/Peek/t/Peek.t 2008-07-12 00:12:37.000000000 -0700
@@ -14,11 +14,21 @@
use Devel::Peek;
-plan(50);
+plan(52);
our $DEBUG = 0;
open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!";
+# If I reference any lexicals in this, I get the entire outer subroutine (or
+# MAIN) dumped too, which isn't really what I want, as it's a lot of faff to
+# maintain that.
+format PIE =
+Pie @<<<<<
+$::type
+Good @>>>>>
+$::mmmm
+.
+
sub do_test {
my $todo = $_[3];
my $repeat_todo = $_[4];
@@ -624,3 +634,32 @@
SUBPROCESS = 0 # $] < 5.009
TYPE = \'>\'
FLAGS = 0x0');
+
+do_test(26,
+ *PIE{FORMAT},
+'SV = $RV\\($ADDR\\) at $ADDR
+ REFCNT = 1
+ FLAGS = \\(ROK\\)
+ RV = $ADDR
+ SV = PVFM\\($ADDR\\) at $ADDR
+ REFCNT = 2
+ FLAGS = \\(\\)
+ IV = 0
+ NV = 0 # $] < 5.009
+ PV = 0 # $] >= 5.011
+ COMP_STASH = 0x0
+ START = $ADDR ===> \\d+
+ ROOT = $ADDR
+ XSUB = 0x0 # $] < 5.009
+ XSUBANY = 0 # $] < 5.009
+ GVGV::GV = $ADDR\\t"main" :: "PIE"
+ FILE = ".*\\b(?i:peek\\.t)"
+ DEPTH = 0
+(?: MUTEXP = $ADDR
+ OWNER = $ADDR
+)? FLAGS = 0x0
+ OUTSIDE_SEQ = \\d+
+ LINES = 0
+ PADLIST = $ADDR
+ PADNAME = $ADDR\\($ADDR\\) PAD = $ADDR\\($ADDR\\)
+ OUTSIDE = $ADDR \\(MAIN\\)');
End of Patch.