From: Jarkko Hietaniemi Date: Fri, 19 Sep 2003 04:46:39 +0000 (+0000) Subject: Tests for change #21284. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2c227d667bcf910e7fef2feea02fec7046f3cb13;p=p5sagit%2Fp5-mst-13.2.git Tests for change #21284. p4raw-link: @21284 on //depot/perl: f338af47923def4d535e1fd32a0aeee66b1f733b p4raw-id: //depot/perl@21285 --- diff --git a/lib/dumpvar.t b/lib/dumpvar.t index 4101940..f13bcee 100644 --- a/lib/dumpvar.t +++ b/lib/dumpvar.t @@ -26,11 +26,12 @@ sub unctrl { print dumpvar::unctrl($_[0]), "\n" } sub uniescape { print dumpvar::uniescape($_[0]), "\n" } sub stringify { print dumpvar::stringify($_[0]), "\n" } sub dumpvalue { + # Call main::dumpValue exactly as the perl5db.pl calls it. local $\ = ''; local $, = ''; local $" = ' '; my @params = @_; - &main::dumpValue(\@params, -1); + &main::dumpValue(\@params,-1); } package Foo; @@ -173,11 +174,22 @@ EXPECT 1 2 2 3 ######## +dumpValue([1..3]); +EXPECT +0 1 +1 2 +2 3 +######## dumpValue({1..4},1); EXPECT 1 => 2 3 => 4 ######## +dumpValue({1..4}); +EXPECT +1 => 2 +3 => 4 +######## dumpValue($foo,1); EXPECT 0 1 @@ -186,6 +198,14 @@ EXPECT 3 4 4 5 ######## +dumpValue($foo); +EXPECT +0 1 +1 2 +2 3 +3 4 +4 5 +######## dumpValue($bar,1); EXPECT 0 1 @@ -194,6 +214,14 @@ EXPECT 3 4 4 5 ######## +dumpValue($bar); +EXPECT +0 1 +1 2 +2 3 +3 4 +4 5 +######## dumpvalue("a"); EXPECT 0 'a'