summaryrefslogtreecommitdiff
path: root/ext/Devel-Peek
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-06-14 13:10:46 +0100
committerDavid Mitchell <davem@iabyn.com>2014-07-08 16:40:03 +0100
commite864b323d8621840aac1fda03b2bf69dba6336ff (patch)
treeb33f355efcd4e6b9d2e3c556d58666c42d3da2d3 /ext/Devel-Peek
parent88b3430b16a6618b54a0c785cd8e0aead375912b (diff)
downloadperl-e864b323d8621840aac1fda03b2bf69dba6336ff.tar.gz
Devel::Peek: test 2-arg form of Dump
the 'Dump var, limit' form wasn't being tested.
Diffstat (limited to 'ext/Devel-Peek')
-rw-r--r--ext/Devel-Peek/t/Peek.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 2cfd8a5205..425268a7f8 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -1030,6 +1030,23 @@ SV = PVAV\($ADDR\) at $ADDR
FLAGS = \(IOK,pIOK\)
IV = 3
ARRAY
+
+do_test('Dump @array,1', '@array,1', <<'ARRAY', '', '', 1);
+SV = PVAV\($ADDR\) at $ADDR
+ REFCNT = 1
+ FLAGS = \(\)
+ ARRAY = $ADDR
+ FILL = 2
+ MAX = 3
+ ARYLEN = 0x0
+ FLAGS = \(REAL\)
+ Elt No. 0
+ SV = IV\($ADDR\) at $ADDR
+ REFCNT = 1
+ FLAGS = \(IOK,pIOK\)
+ IV = 1
+ARRAY
+
%hash = 1..2;
do_test('Dump %hash', '%hash', <<'HASH', '', '', 1);
SV = PVHV\($ADDR\) at $ADDR
@@ -1046,6 +1063,7 @@ SV = PVHV\($ADDR\) at $ADDR
FLAGS = \(IOK,pIOK\)
IV = 2
HASH
+
$_ = "hello";
do_test('rvalue substr', 'substr $_, 1, 2', <<'SUBSTR', '', '', 1);
SV = PV\($ADDR\) at $ADDR