From: H.Merijn Brand Date: Fri, 26 Sep 2008 08:39:27 +0000 (+0000) Subject: $! and $1 are PVMG(), but their content is undefined when peeking X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4a03afaa835dc89f39712165b7206e034df8002;p=p5sagit%2Fp5-mst-13.2.git $! and $1 are PVMG(), but their content is undefined when peeking p4raw-id: //depot/perl@34420 --- diff --git a/ext/XS/APItest/t/svpeek.t b/ext/XS/APItest/t/svpeek.t index cf66f65..528beb7 100644 --- a/ext/XS/APItest/t/svpeek.t +++ b/ext/XS/APItest/t/svpeek.t @@ -12,7 +12,7 @@ BEGIN { use strict; use warnings; -use Test::More tests => 49; +use Test::More tests => 50; BEGIN { use_ok('XS::APItest') }; @@ -29,12 +29,12 @@ $| = 1; is (DPeek ($^), 'PVMG()', '$^'); is (DPeek ($=), 'PVMG()', '$='); is (DPeek ($-), 'PVMG()', '$-'); - is (DPeek ($!), 'PVMG(""\0)', '$!'); +like (DPeek ($!), qr'^PVMG\("', '$!'); is (DPeek ($?), 'PVMG()', '$?'); is (DPeek ($|), 'PVMG(1)', '$|'); "abc" =~ m/(b)/; # Don't know why these magic vars have this content -# is (DPeek ($1), 'PVMG("$"\0)', ' $1'); +like (DPeek ($1), qr'^PVMG\("', ' $1'); is (DPeek ($`), 'PVMG()', ' $`'); is (DPeek ($&), 'PVMG()', ' $&'); is (DPeek ($'), 'PVMG()', " \$'");